Karim Belabas on Thu, 20 Nov 1997 20:53:50 +0100


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

patch5


This corrects the bug reported by Gerhard in message 12.

> (20:06) gp > T=x^4+24*x^2+585*x+1791;nf=nfinit(T);
> (20:07) gp > NF=nfinit(nf,3)
>   ***   segmentation fault: bug in GP (please report).

Uninitialized variable, specific to the flag 3 in nfinit. This somehow only
showed up on Linux systems (with pretty high optimization level...).

Keep'em comin'...

     Karim.

============================ patch 5 (2.0.alpha) ==========================

*** src/basemath/base1.c.orig	Fri Nov 14 04:53:15 1997
--- src/basemath/base1.c	Thu Nov 20 20:24:35 1997
***************
*** 2484,2490 ****
  GEN
  initalgall0(GEN x, long flag, long prec)
  {
!   GEN lead,y,p1,p2,p3,p4,p5,p6,p7,p10,p11,p20,fieldd,dx,index,fa,res;
    long n,i,j,av=avma,av2,av3,tetpil,k,lgp,r1,r2,ru,PRECREG;
  
    if (typ(x)==t_POL)
--- 2484,2490 ----
  GEN
  initalgall0(GEN x, long flag, long prec)
  {
!   GEN lead = NULL,y,p1,p2,p3,p4,p5,p6,p7,p10,p11,p20,fieldd,dx,index,fa,res;
    long n,i,j,av=avma,av2,av3,tetpil,k,lgp,r1,r2,ru,PRECREG;
  
    if (typ(x)==t_POL)
--
Karim Belabas                          e-mail:
Max-Planck-Institut fuer Mathematik       karim@mpim-bonn.mpg.de
Gottfried-Claren-Str. 26               tel:
53225 Bonn (Germany)                      (00 49 228) 402-245