Igor Schein on Fri, 14 Nov 2003 18:45:08 +0100

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

nffactor() bug


                 GP/PARI CALCULATOR Version 2.2.7 (development)
               Itanium running linux (ia64 kernel) 64-bit version
                        compiled: Nov 14 2003, gcc-3.2.2
                (readline v4.2 enabled, extended help available)

? nffactor(nfinit(y^4+7^2),x^28-14*x^24+20321*x^20+166992*x^16+1171296*x^12+1342208*x^8-5005056*x^4+3211264);     
  ***   bug in GP (Segmentation Fault), please report

When I wanted to tried building a debugging binary on the same platform (via Configure -g) I got this compilation error: 

../src/kernel/none/mp.c: In function `muluu':
../src/kernel/none/mp.c:620: `asm' operand requires impossible reload

I was able to include debugging symbols by using CFLAGS=-g3, and the stack looks like this:

#0  bestlift_init (a=81, nf=0x2000000000e310c0, pr=0x2000000000e2d8b8, C=0x2000000000e27f90, L=0x60000fffffffa360) at ../src/modules/nffactor.c:1056
#1  0x40000000003caeb0 in nfsqff (nf=0x2000000000e310c0, pol=0x2000000000e2e098, fl=0) at ../src/modules/nffactor.c:1397
#2  0x40000000003cdff0 in bestlift_init (a=2305843009228574912, nf=0x2000000000e2eb10, pr=0x2000000000e2e940, C=0x600000000002bbf8, L=0x600000000002b8c8) at ../src/modules/nffactor.c:1055
#3  0x40000000003cdff0 in bestlift_init (a=6917546619827102856, nf=0x60000fffffffa488, pr=0x40000000004bc222, C=0x600000000007eff8, L=0x6000000000022308) at ../src/modules/nffactor.c:1055
#4  0xf67e56665fa9a9a9 in ?? ()
#5  0x40000000003cdff0 in bestlift_init (a=3, nf=0x600000000007efe0, pr=0x0, C=0x0, L=0x0) at ../src/modules/nffactor.c:1055
#6  0x00000000 in ?? ()

I can also reproduce the SEGV on Solaris with gcc-compiled 64bit
binary, but I haven't build 64bit gdb for it yet.