Manish on Wed, 05 May 2004 08:26:23 +0200


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

Bug??


I am not sure if this is a bug in pari or gcc or if I am doing 
something wrong. 
While compiling pari with gcc-3.4.0, I see 

/usr/bin/gcc -c -O2 -DGCC_INLINE -Wall -Wno-implicit -fomit-frame-pointer
-march=i686   -I. -I../src/headers  -o buch2.o ../src/basemath/buch2.c
../src/basemath/buch2.c: In function `buchall':
../src/basemath/buch2.c:2925: warning: function called through a non-compatible
type
../src/basemath/buch2.c:2925: note: if this code is reached, the program will
abort

and like it says as soon as I type ./gp after the compilation completes
I get

  ***   bug in GP (Segmentation Fault), please report
  ***   Error in the PARI system. End of program.

I am attaching the output of strace if its helpful.

% strace ./gp
execve("./gp", ["./gp"], [/* 34 vars */]) = 0
uname({sys="Linux", node="brahma", ...}) = 0
brk(0)                                  = 0x806d000
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x40014000
open("/etc/ld.so.preload", O_RDONLY)    = -1 ENOENT (No such file or directory)
open("/home/mks/downloads/pari-2.1.5/Olinux-i686/i686/mmx/libreadline.so.4",
O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/home/mks/downloads/pari-2.1.5/Olinux-i686/i686/mmx", 0xbfffefc0) = -1
ENOENT (No such file or directory)
open("/home/mks/downloads/pari-2.1.5/Olinux-i686/i686/libreadline.so.4",
O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/home/mks/downloads/pari-2.1.5/Olinux-i686/i686", 0xbfffefc0) = -1
ENOENT (No such file or directory)
open("/home/mks/downloads/pari-2.1.5/Olinux-i686/mmx/libreadline.so.4",
O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/home/mks/downloads/pari-2.1.5/Olinux-i686/mmx", 0xbfffefc0) = -1
ENOENT (No such file or directory)
open("/home/mks/downloads/pari-2.1.5/Olinux-i686/libreadline.so.4", O_RDONLY) =
-1 ENOENT (No such file or directory)
stat64("/home/mks/downloads/pari-2.1.5/Olinux-i686", {st_mode=S_IFDIR|0755,
st_size=1784, ...}) = 0
open("/usr/local/lib/i686/mmx/libreadline.so.4", O_RDONLY) = -1 ENOENT (No such
file or directory)
stat64("/usr/local/lib/i686/mmx", 0xbfffefc0) = -1 ENOENT (No such file or
directory)
open("/usr/local/lib/i686/libreadline.so.4", O_RDONLY) = -1 ENOENT (No such
file or directory)
stat64("/usr/local/lib/i686", 0xbfffefc0) = -1 ENOENT (No such file or
directory)
open("/usr/local/lib/mmx/libreadline.so.4", O_RDONLY) = -1 ENOENT (No such file
or directory)
stat64("/usr/local/lib/mmx", 0xbfffefc0) = -1 ENOENT (No such file or
directory)
open("/usr/local/lib/libreadline.so.4", O_RDONLY) = -1 ENOENT (No such file or
directory)
stat64("/usr/local/lib", {st_mode=S_IFDIR|0755, st_size=384, ...}) = 0
open("/usr/X11R6/lib/i686/mmx/libreadline.so.4", O_RDONLY) = -1 ENOENT (No such
file or directory)
stat64("/usr/X11R6/lib/i686/mmx", 0xbfffefc0) = -1 ENOENT (No such file or
directory)
open("/usr/X11R6/lib/i686/libreadline.so.4", O_RDONLY) = -1 ENOENT (No such
file or directory)
stat64("/usr/X11R6/lib/i686", 0xbfffefc0) = -1 ENOENT (No such file or
directory)
open("/usr/X11R6/lib/mmx/libreadline.so.4", O_RDONLY) = -1 ENOENT (No such file
or directory)
stat64("/usr/X11R6/lib/mmx", 0xbfffefc0) = -1 ENOENT (No such file or
directory)
open("/usr/X11R6/lib/libreadline.so.4", O_RDONLY) = -1 ENOENT (No such file or
directory)
stat64("/usr/X11R6/lib", {st_mode=S_IFDIR|0755, st_size=4464, ...}) = 0
open("/etc/ld.so.cache", O_RDONLY)      = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=33156, ...}) = 0
mmap2(NULL, 33156, PROT_READ, MAP_PRIVATE, 3, 0) = 0x40015000
close(3)                                = 0
open("/usr/lib/libreadline.so.4", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0P\257\0"..., 1024) =
1024
fstat64(3, {st_mode=S_IFREG|0755, st_size=205397, ...}) = 0
mmap2(NULL, 178900, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x4001e000
mprotect(0x40045000, 19156, PROT_NONE)  = 0
mmap2(0x40045000, 16384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x26)
= 0x40045000
mmap2(0x40049000, 2772, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x40049000
close(3)                                = 0
open("/home/mks/downloads/pari-2.1.5/Olinux-i686/libncurses.so.5", O_RDONLY) =
-1 ENOENT (No such file or directory)
open("/usr/local/lib/libncurses.so.5", O_RDONLY) = -1 ENOENT (No such file or
directory)
open("/usr/X11R6/lib/libncurses.so.5", O_RDONLY) = -1 ENOENT (No such file or
directory)
open("/lib/libncurses.so.5", O_RDONLY)  = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\300\341"..., 1024) =
1024
fstat64(3, {st_mode=S_IFREG|0644, st_size=279707, ...}) = 0
mmap2(NULL, 257292, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x4004a000
mprotect(0x40080000, 36108, PROT_NONE)  = 0
mmap2(0x40080000, 36864, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x35)
= 0x40080000
close(3)                                = 0
open("/home/mks/downloads/pari-2.1.5/Olinux-i686/libpari.so.1", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0@j\t\000"..., 1024) =
1024
fstat64(3, {st_mode=S_IFREG|0755, st_size=2716959, ...}) = 0
mmap2(NULL, 2709808, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x40089000
mprotect(0x40301000, 121136, PROT_NONE) = 0
mmap2(0x40301000, 49152, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x278)
= 0x40301000
mmap2(0x4030d000, 71984, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x4030d000
close(3)                                = 0
open("/home/mks/downloads/pari-2.1.5/Olinux-i686/libX11.so.6", O_RDONLY) = -1
ENOENT (No such file or directory)
open("/usr/local/lib/libX11.so.6", O_RDONLY) = -1 ENOENT (No such file or
directory)
open("/usr/X11R6/lib/libX11.so.6", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\260\22"..., 1024) =
1024
fstat64(3, {st_mode=S_IFREG|0755, st_size=916648, ...}) = 0
mmap2(NULL, 831032, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x4031f000
mprotect(0x403e7000, 11832, PROT_NONE)  = 0
mmap2(0x403e7000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0xc7)
= 0x403e7000
close(3)                                = 0
open("/home/mks/downloads/pari-2.1.5/Olinux-i686/libdl.so.2", O_RDONLY) = -1
ENOENT (No such file or directory)
open("/usr/local/lib/libdl.so.2", O_RDONLY) = -1 ENOENT (No such file or
directory)
open("/usr/X11R6/lib/libdl.so.2", O_RDONLY) = -1 ENOENT (No such file or
directory)
open("/lib/libdl.so.2", O_RDONLY)       = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\320\30"..., 1024) =
1024
fstat64(3, {st_mode=S_IFREG|0755, st_size=11741, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x403ea000
mmap2(NULL, 11376, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x403eb000
mprotect(0x403ed000, 3184, PROT_NONE)   = 0
mmap2(0x403ed000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x1) =
0x403ed000
close(3)                                = 0
open("/home/mks/downloads/pari-2.1.5/Olinux-i686/libm.so.6", O_RDONLY) = -1
ENOENT (No such file or directory)
open("/usr/local/lib/libm.so.6", O_RDONLY) = -1 ENOENT (No such file or
directory)
open("/usr/X11R6/lib/libm.so.6", O_RDONLY) = -1 ENOENT (No such file or
directory)
open("/lib/libm.so.6", O_RDONLY)        = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\2405\0"..., 1024) =
1024
fstat64(3, {st_mode=S_IFREG|0755, st_size=174649, ...}) = 0
mmap2(NULL, 137920, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x403ee000
mprotect(0x4040f000, 2752, PROT_NONE)   = 0
mmap2(0x4040f000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x20) =
0x4040f000
close(3)                                = 0
open("/home/mks/downloads/pari-2.1.5/Olinux-i686/libc.so.6", O_RDONLY) = -1
ENOENT (No such file or directory)
open("/usr/local/lib/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or
directory)
open("/usr/X11R6/lib/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or
directory)
open("/lib/libc.so.6", O_RDONLY)        = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\200X\1"..., 1024) =
1024
fstat64(3, {st_mode=S_IFREG|0755, st_size=1412905, ...}) = 0
mmap2(NULL, 1221444, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x40410000
mprotect(0x40534000, 25412, PROT_NONE)  = 0
mmap2(0x40534000, 16384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x124)
= 0x40534000
mmap2(0x40538000, 9028, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x40538000
close(3)                                = 0
mprotect(0x40089000, 2588672, PROT_READ|PROT_WRITE) = 0
mprotect(0x40089000, 2588672, PROT_READ|PROT_EXEC) = 0
munmap(0x40015000, 33156)               = 0
brk(0)                                  = 0x806d000
brk(0x806e000)                          = 0x806e000
brk(0)                                  = 0x806e000
brk(0)                                  = 0x806e000
brk(0x8072000)                          = 0x8072000
brk(0)                                  = 0x8072000
brk(0x8073000)                          = 0x8073000
open("/home/mks/.gprc", O_RDONLY)       = -1 ENOENT (No such file or directory)
open(".gprc", O_RDONLY)                 = -1 ENOENT (No such file or directory)
open("/etc/gprc", O_RDONLY)             = -1 ENOENT (No such file or directory)
open("C:/_gprc", O_RDONLY)              = -1 ENOENT (No such file or directory)
getrlimit(RLIMIT_STACK, {rlim_cur=8192*1024, rlim_max=RLIM_INFINITY}) = 0
mmap2(NULL, 4001792, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x4053b000
brk(0)                                  = 0x8073000
brk(0x807d000)                          = 0x807d000
brk(0)                                  = 0x807d000
brk(0x808d000)                          = 0x808d000
brk(0)                                  = 0x808d000
brk(0x809d000)                          = 0x809d000
brk(0)                                  = 0x809d000
brk(0x80ad000)                          = 0x80ad000
brk(0)                                  = 0x80ad000
brk(0x80bd000)                          = 0x80bd000
brk(0)                                  = 0x80bd000
brk(0x80cd000)                          = 0x80cd000
brk(0)                                  = 0x80cd000
brk(0x80ce000)                          = 0x80ce000
rt_sigaction(SIGBUS, {0x804fd80, [BUS], SA_RESTORER|SA_RESTART, 0x40438d58},
{SIG_DFL}, 8) = 0
rt_sigaction(SIGFPE, {0x804fd80, [FPE], SA_RESTORER|SA_RESTART, 0x40438d58},
{SIG_DFL}, 8) = 0
rt_sigaction(SIGINT, {0x804fd80, [INT], SA_RESTORER|SA_RESTART, 0x40438d58},
{SIG_DFL}, 8) = 0
rt_sigaction(SIGPIPE, {0x804fd80, [PIPE], SA_RESTORER|SA_RESTART, 0x40438d58},
{SIG_DFL}, 8) = 0
rt_sigaction(SIGSEGV, {0x804fd80, [SEGV], SA_RESTORER|SA_RESTART, 0x40438d58},
{SIG_DFL}, 8) = 0
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
rt_sigaction(SIGSEGV, {0x804fd80, [SEGV], SA_RESTORER|SA_RESTART, 0x40438d58},
{0x804fd80, [SEGV], SA_RESTORER|SA_RESTART, 0x40438d58}, 8) = 0
write(2, "  ***   bug in", 14  ***   bug in)          = 14
write(2, " GP (Segmentation Fault), please"..., 39 GP (Segmentation Fault),
please report) = 39
write(2, "\n", 1
)                       = 1
rt_sigaction(SIGINT, {SIG_IGN}, {0x804fd80, [INT], SA_RESTORER|SA_RESTART,
0x40438d58}, 8) = 0
rt_sigaction(SIGINT, {0x804fd80, [INT], SA_RESTORER|SA_RESTART, 0x40438d58},
{SIG_IGN}, 8) = 0
write(2, "  ***   Error in the PARI system"..., 50  ***   Error in the PARI
system. End of program.
) = 50
exit_group(1)                           = ?