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


🔗 View this message in rfc822 format

X-Loop: allomber@math.u-bordeaux.fr
Subject: Bug#1237: undefined behaviour in pari_init_parser
Reply-To: Julian Taylor <jtaylor.debian@googlemail.com>, 1237@pari.math.u-bordeaux.fr
Resent-From: Julian Taylor <jtaylor.debian@googlemail.com>
Resent-To: bug-submit-list@pari.math.u-bordeaux.fr
Resent-CC: Karim.Belabas@math.u-bordeaux.fr
Resent-Date: Mon, 19 Sep 2011 21:33:02 UTC
Resent-Message-ID: <handler.1237.B1237.13164674494714@pari.math.u-bordeaux.fr>
Resent-Sender: allomber@math.u-bordeaux.fr
X-PARI/GP-PR-Message: report 1237
X-PARI/GP-PR-Package: pari
X-PARI/GP-PR-Keywords: 
Received: via spool by 1237-submit@pari.math.u-bordeaux.fr id=B1237.13164674494714
          (code B ref 1237); Mon, 19 Sep 2011 21:33:02 UTC
Received: (at 1237) by pari.math.u-bordeaux.fr; 19 Sep 2011 21:24:09 +0000
Received: from mail-fx0-f45.google.com ([209.85.161.45])
	by pari.math.u-bordeaux1.fr with esmtp (Exim 4.69)
	(envelope-from <jtaylor.debian@googlemail.com>)
	id 1R5lJx-0001Dz-4Z
	for 1237@pari.math.u-bordeaux.fr; Mon, 19 Sep 2011 23:24:09 +0200
Received: by fxh13 with SMTP id 13so6635226fxh.32
        for <1237@pari.math.u-bordeaux.fr>; Mon, 19 Sep 2011 14:24:03 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=googlemail.com; s=gamma;
        h=message-id:date:from:user-agent:mime-version:to:cc:subject
         :references:in-reply-to:x-enigmail-version:content-type;
        bh=REAWlR4Bf41W+mh3lvtx2yxBvKbQTG5Tr2Ag96JBmp4=;
        b=Qlno7QibiDa/iNzHCE0Yp1ZCim6v6tfEbc/6iO7nFg9MgGdjF2XYj7gq3LaVAmL7K/
         Ir5p5MZGU7bR7UE7z4R0adXAPzcZrZCkT2dZlDCn5TqSZRX1/9FSgm7M/LoewK9omi36
         7FzulrPfeWa/8VlRH/jRBZYy1wkzlNnkSwGgk=
Received: by 10.223.50.154 with SMTP id z26mr2412faf.64.1316467443678;
        Mon, 19 Sep 2011 14:24:03 -0700 (PDT)
Received: from [192.168.0.12] (p5498A657.dip.t-dialin.net. [84.152.166.87])
        by mx.google.com with ESMTPS id o16sm22878182fag.21.2011.09.19.14.24.00
        (version=SSLv3 cipher=OTHER);
        Mon, 19 Sep 2011 14:24:01 -0700 (PDT)
Message-ID: <4E77B2EF.8080000@googlemail.com>
Date: Mon, 19 Sep 2011 23:23:59 +0200
From: Julian Taylor <jtaylor.debian@googlemail.com>
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:7.0) Gecko/20110914 Thunderbird/7.0
MIME-Version: 1.0
To: Bill Allombert <Bill.Allombert@math.u-bordeaux1.fr>
CC: 1237@pari.math.u-bordeaux.fr
References: <4E5E52C5.4050702@googlemail.com> <20110901202245.GH17070@yellowpig> <4E5FF27B.5080600@googlemail.com> <20110902165738.GM17070@yellowpig> <20110913144151.GE6199@yellowpig> <4E76503A.9070006@googlemail.com> <20110918214754.GM18359@yellowpig>
In-Reply-To: <20110918214754.GM18359@yellowpig>
X-Enigmail-Version: 1.4a1pre
Content-Type: multipart/signed; micalg=pgp-sha1;
 protocol="application/pgp-signature";
 boundary="------------enig1DD75741D2B16A4205937536"
[Message part 1 (text/plain, inline)]
On 09/18/2011 11:47 PM, Bill Allombert wrote:
>>
>> unfortunately it still fails with the same issue in my qemu armel chroot
>> on ubuntu oneiric which has pretty much the same gcc version as debian
>> (4.6-9ubuntu3).
>> I don't understand why.
> 
> Can you check with the debugger whether it is not a different instance of the same
> issue ? The function pari_init_parser has a similar issue.
> 
> Cheers,
> Bill.

doing the same thing for pari_init_parser does fix the problem in my
armel emulation but one must mess with the pari_tree variable which
probably breaks api.
Maybe some header restructuring + a macro can retain it.
See attached patch which should not break api but it does break abi and
is really ugly :/
[debian-changes-2.5.0-2 (text/plain, attachment)]
[signature.asc (application/pgp-signature, attachment)]

Send a report that this bug log contains spam.


Bill Allombert <allomber@math.u-bordeaux.fr>. Last modified: Sat Aug 26 17:15:04 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.