Karim Belabas on Mon, 06 Aug 2007 12:24:09 +0200

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

Re: bug in current CVS

* Walter Neumann [2007-08-06 05:33]:
> Using the current CVS with GMP:
> I get the following:
> ? f(a)=vecsort(subst(nfgaloisconj(x^4+1,,a),x,100))
> ? f(1)
>    *** nfgaloisconj: bug in PARI/GP (Segmentation Fault), please report

Yes, or simply 'nfgaloisconj(x^4+1,,1)'. Igor Schein reported a similar
bug as #652 <http://pari.math.u-bordeaux.fr/cgi-bin/bugreport.cgi?bug=652>.

This is due to a recent change I made to the gerepileupto() libpari
function (call lower-level gerepileuptoint / gerepiluptoleaf if possible),
which didn't take into account the widespread use of an undocumented
hack : the possibility to use sentinels.

Namely, gerepileupto(av, q) was functionally equivalent to avma = av
when q was not on the PARI stack. It needn't even be a well formed GEN, and
this was exploited here with q = NULL.

I have fixed my previous patch, and documented the hack, promoting it
to a useful feature.

Thanks for spotting this!

Karim Belabas                  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-bordeaux.fr/~belabas/
F-33405 Talence (France)       http://pari.math.u-bordeaux.fr/  [PARI/GP]