Bill Allombert on Mon, 26 May 2014 11:19:22 +0200


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: bug in PARI/GP (Segmentation Fault), please report.


On Sun, May 25, 2014 at 03:41:31AM -0700, John W. Nicholson wrote:
> $ gp
> Reading GPRC: /home/owner/.gprc ...Done.
> 
>                                           GP/PARI CALCULATOR Version 2.7.1 (released)
>                                  amd64 running linux (x86-64/GMP-6.0.0 kernel) 64-bit version
>                               compiled: May 17 2014, gcc version 4.8.2 (Ubuntu 4.8.2-21ubuntu1) 
>                                                    threading engine: pthread
>                                         (readline v6.3 enabled, extended help enabled)
> 
>                                             Copyright (C) 2000-2014 The PARI Group
> 
> PARI/GP is free software, covered by the GNU General Public License, and comes WITHOUT ANY WARRANTY WHATSOEVER.
> 
> Type ? for help, \q to quit.
> Type ?12 for how to get moral (and possibly technical) support.
> 
> parisize = 1000000000, primelimit = 1000000000
>    realprecision = 115 significant digits (100 digits displayed)
> 
> 
> n=2;while(ln(prime(n))>ln(prime(n+1))/exp(1/(n))&&n<pl,n++);print(n)
>   ***   at top-level: ...=2;while(ln(prime(n))>ln(prime(n+1))/exp(1/(n
>   ***                                             ^--------------------
>   *** prime: bug in PARI/GP (Segmentation Fault), please report.
>   ***   Break loop: type 'break' to go back to GP prompt
> break> n
> 23163299
> break> 
> 
> Is this a bug on my machine, or can it be reproduced by others? Has this been reported before?

We managed to reproduce it:
./gp  -f -p1000000000
? n=23163299;N = n + 1;while(log(prime(n))>log(prime(n+1))/exp(1/(n))&&n<N,n++);
  ***   at top-level: ...;while(log(prime(n))>log(prime(n+1))/exp(1/(n
  ***                                             ^--------------------
  *** prime: bug in PARI/GP (Segmentation Fault), please report.
  ***   Break loop: type 'break' to go back to GP prompt


However, using -p1000000000 is not needed anyore with PARI 2.7, thus you can omit
it to avoid this bug.

Cheers,
Bill