PARI/GP Bug report logs - #1237
undefined behaviour in pari_init_parser

Package: pari; Maintainer for pari is Aurel Page <aurel.page@normalesup.org>; Source for pari is src:pari.

Reported by: Julian Taylor <jtaylor.debian@googlemail.com>

Date: Wed, 31 Aug 2011 15:33:08 UTC

Severity: normal

Done: Bill Allombert <Bill.Allombert@math.u-bordeaux1.fr>

Bug is archived. No further changes may be made.

Full log


Message #60 received at 1237@pari.math.u-bordeaux.fr (full text, mbox, reply):

Received: (at 1237) by pari.math.u-bordeaux.fr; 28 Jan 2012 20:11:30 +0000
From Bill.Allombert@math.u-bordeaux1.fr Sat Jan 28 21:11:30 2012
Received: from smtp1-g21.free.fr ([212.27.42.1])
	by pari.math.u-bordeaux1.fr with esmtp (Exim 4.72)
	(envelope-from <Bill.Allombert@math.u-bordeaux1.fr>)
	id 1RrEcU-0001oo-Il
	for 1237@pari.math.u-bordeaux.fr; Sat, 28 Jan 2012 21:11:30 +0100
Received: from yellowpig (unknown [IPv6:2a01:e35:2f45:9a0:223:14ff:fe3e:4490])
	by smtp1-g21.free.fr (Postfix) with ESMTP id 108169401AF;
	Sat, 28 Jan 2012 21:11:24 +0100 (CET)
Received: from bill by yellowpig with local (Exim 4.72)
	(envelope-from <Bill.Allombert@math.u-bordeaux1.fr>)
	id 1RrEcN-0004ib-MX; Sat, 28 Jan 2012 21:11:23 +0100
Date: Sat, 28 Jan 2012 21:11:23 +0100
From: Bill Allombert <Bill.Allombert@math.u-bordeaux1.fr>
To: Julian Taylor <jtaylor.debian@googlemail.com>
Cc: 1237@pari.math.u-bordeaux.fr
Subject: Re: Bug#1237: undefined behaviour in pari_init_parser
Message-ID: <20120128201123.GG18200@yellowpig>
References: <4E5E52C5.4050702@googlemail.com>
 <20110901202245.GH17070@yellowpig>
 <4E5FF27B.5080600@googlemail.com>
 <20110902165738.GM17070@yellowpig>
 <20110913144151.GE6199@yellowpig>
 <20120126162508.GA18262@yellowpig>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20120126162508.GA18262@yellowpig>
User-Agent: Mutt/1.5.20 (2009-06-14)
On Thu, Jan 26, 2012 at 05:25:08PM +0100, Bill Allombert wrote:
> On Tue, Sep 13, 2011 at 04:41:51PM +0200, Bill Allombert wrote:
> > On Fri, Sep 02, 2011 at 06:57:38PM +0200, Bill Allombert wrote:
> > > On Thu, Sep 01, 2011 at 11:00:43PM +0200, Julian Taylor wrote:
> > > 
> > > Well, you can try the attached patch which work around the compiler issue without
> > > breaking the ABI (tested on sparc).
> > 
> > Hello Julian, 
> > I have uploaded a new Debian package that includes this patch and it was built correctly
> > on all platform, as you can see 
> > <https://buildd.debian.org/status/package.php?p=pari>
> > this includes armel and sparc. 
> > Do you still have issues on armel ?
> > 
> > A technical note: it is possible that stack_init is not standard compliant, but it
> > should be possible to rewrite it in a standard compliant according to
> > <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49330#c8>
> > However gcc-4.6 bug PR49330 is still open so PARI would still be miscompiled.
> 
> Hello Julian,
> 
> Sorry for the long delay,
> 
> I just fixed stack_base to be standard compliant. It seems actually improve things
> with the version of gcc I tried (Debian 4.6.2-12). It did not with older versions.
> 
> This is is revision c3f6b58983. This is backported in PARI 2.5.1 in rev ee8e36931.
> PARI 2.5.1 will be released soon.
> Please check if that also fix things for you.

And now that the code is standard compliant, on sparc-linux, gcc 4.6.2 miscompiles it
by hitting PR49330 while it compiles correctly the non compliant code. Go figure...

Cheers,
Bill.



Send a report that this bug log contains spam.


Bill Allombert <allomber@math.u-bordeaux.fr>. Last modified: Sat Aug 26 17:15:13 2023; Machine Name: pari

PARI/GP Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.