PARI/GP Bug report logs - #1374
isprime fails with Bus Error

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

Reported by: Charles Greathouse <charles.greathouse@case.edu>

Date: Tue, 13 Nov 2012 23:33:03 UTC

Severity: normal

Done: Karim Belabas <Karim.Belabas@math.u-bordeaux1.fr>

Bug is archived. No further changes may be made.

Full log


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

Received: (at 1374-close) by pari.math.u-bordeaux.fr; 14 Nov 2012 01:07:24 +0000
From Karim.Belabas@math.u-bordeaux1.fr Wed Nov 14 02:07:24 2012
Received: from smail.math.u-bordeaux1.fr ([147.210.16.22])
	by pari.math.u-bordeaux1.fr with esmtp (Exim 4.72)
	(envelope-from <Karim.Belabas@math.u-bordeaux1.fr>)
	id 1TYRRs-0008Fc-9x
	for 1374-close@pari.math.u-bordeaux.fr; Wed, 14 Nov 2012 02:07:24 +0100
Received: from localhost (localhost.localdomain [127.0.0.1])
	by smail.math.u-bordeaux1.fr (Postfix) with ESMTP id 48DB06FF43
	for <1374-close@pari.math.u-bordeaux.fr>; Wed, 14 Nov 2012 02:07:19 +0100 (CET)
X-Virus-Scanned: amavisd-new at math.u-bordeaux1.fr
X-Spam-Flag: NO
X-Spam-Score: 0.821
X-Spam-Level: 
X-Spam-Status: No, score=0.821 required=6 tests=[BAYES_50=0.8,
	RCVD_IN_PBL=0.01, RCVD_IN_SORBS_DUL=0.001, RDNS_DYNAMIC=0.01]
	autolearn=disabled
Received: from smail.math.u-bordeaux1.fr ([127.0.0.1])
	by localhost (smail.math.u-bordeaux1.fr [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id XsXWVSWSZ6EI; Wed, 14 Nov 2012 02:07:18 +0100 (CET)
Received: from colibri.math.u-bordeaux1.fr (tal33-1-82-226-197-154.fbx.proxad.net [82.226.197.154])
	(using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits))
	(No client certificate requested)
	by smail.math.u-bordeaux1.fr (Postfix) with ESMTP id 6377A6FF31;
	Wed, 14 Nov 2012 02:07:18 +0100 (CET)
Received: from kb by colibri.math.u-bordeaux1.fr with local (Exim 4.80)
	(envelope-from <Karim.Belabas@math.u-bordeaux1.fr>)
	id 1TYRRk-00056g-J6; Wed, 14 Nov 2012 02:07:16 +0100
Date: Wed, 14 Nov 2012 02:07:16 +0100
From: Karim Belabas <Karim.Belabas@math.u-bordeaux1.fr>
To: Charles Greathouse <charles.greathouse@case.edu>,
	1374-close@pari.math.u-bordeaux.fr
Subject: Re: Bug#1374: isprime fails with Bus Error
Message-ID: <20121114010716.GA19135@math.u-bordeaux1.fr>
References: <CAAkfSGKZUc-Ppm5=MkRXLFNgKwYnMum05ukKrcn6XOnp9CMO5w@mail.gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <CAAkfSGKZUc-Ppm5=MkRXLFNgKwYnMum05ukKrcn6XOnp9CMO5w@mail.gmail.com>
User-Agent: Mutt/1.5.21 (2010-09-15)
* Charles Greathouse [2012-11-14 00:41]:
> > N = 4309513411435775833571;
> > ispseudoprime(N)
> %1 = 1
> > isprime(N)
>   ***   at top-level: isprime(N)
>   ***                 ^----------
>   *** isprime: bug in PARI/GP (Bus Error), please report.
>   ***   Break loop: type 'break' to go back to GP prompt

Obscure bug introduced in 28e1f18b. Fixed in master:

  commit b6eefc625299e25f7d4feb1f95e43cf8bc1a4e9f
  Author: Karim Belabas <Karim.Belabas@math.u-bordeaux1.fr>
  Date:   Wed Nov 14 02:04:12 2012 +0100

      pass around pC length instead of abusing lg() [#1374]
      
      introduced in 28e1f18b: isprime(4309513411435775833571) -> SEGV

Thanks for your report !

    K.B.
-- 
Karim Belabas, IMB (UMR 5251)  Tel: (+33) (0)5 40 00 26 17
Universite Bordeaux 1          Fax: (+33) (0)5 40 00 69 50
351, cours de la Liberation    http://www.math.u-bordeaux1.fr/~belabas/
F-33405 Talence (France)       http://pari.math.u-bordeaux1.fr/  [PARI/GP]
`



Send a report that this bug log contains spam.


Bill Allombert <allomber@math.u-bordeaux.fr>. Last modified: Sat Aug 26 16:39:37 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.