Package: gprolog
Version: 1.2.18-12

Any time a division is done in gprolog, I get a segfault with sprintf()
at the top of the backtrace, and what looks like tons of NULLs in the
stacktrace.

To repro:
cat > a.pl <<EOF
foo(X) :-
        X is 10 / 3.
EOF
gprolog
| ?- consult(a).
| ?- foo(X).

Cutting out mass of addx 0's, debug output here:
Script started on Sat Mar 11 13:10:32 2006
barbeque/zarathustra:games: cat > a.pl<<EOF
> foo(X) :- X is 10 / 3.
> EOF
barbeque/zarathustra:games: gdb gprolog
GNU gdb 6.3-debian
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "x86_64-linux"...(no debugging symbols found)
Using host libthread_db library "/lib/libthread_db.so.1".

(gdb) r
Starting program: /usr/bin/gprolog
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
GNU Prolog 1.2.18
By Daniel Diaz
Copyright (C) 1999-2004 Daniel Diaz
| ?- consult(a).
compiling /public/src/mine/games/a.pl for byte code...
/public/src/mine/games/a.pl compiled, 1 lines read - 347 bytes written, 6 ms

yes
| ?- foo(X).


Program received signal SIGSEGV, Segmentation fault.
0x00002b76d8c5e581 in sprintf () from /lib/libc.so.6
(gdb) bt
#0  0x00002b76d8c5e581 in sprintf () from /lib/libc.so.6
#1  0x000000000048b218 in ?? ()
#2  0x000000000048c5e6 in ?? ()
#3  0x000000000044cea1 in ?? ()
#4  0x00000000000038cb in ?? ()
#5  0x0000000000000000 in ?? ()
<<snippage>>
#701 0x0000000000000000 in ?? ()
#702 0x00007fffffbce186 in ?? ()
#703 0x00002b76d8e2f000 in stderr () from /lib/libc.so.6
#704 0x0000000000000001 in ?? ()
#705 0x00007fffffbcdef0 in ?? ()
#706 0x0000000000000014 in ?? ()
#707 0x00007fffffbcdef0 in ?? ()
#708 0x00002b76d8c8089f in _IO_default_xsputn () from /lib/libc.so.6
#709 0x00002b76d8c5792b in vfprintf () from /lib/libc.so.6
#710 0x00002b76d8c77105 in vsprintf () from /lib/libc.so.6
#711 0x00002b76d89770fa in _dl_lookup_versioned_symbol_skip () from 
/lib64/ld-linux-x86-64.so.2
#712 0x00002b76d8976074 in _dl_lookup_versioned_symbol () from 
/lib64/ld-linux-x86-64.so.2
#713 0x00002b76d8979718 in _dl_map_object_deps () from 
/lib64/ld-linux-x86-64.so.2
Previous frame inner to this frame (corrupt stack?)
(gdb) info reg
rax            0x1      1
rbx            0x2b76dc64f360   47789503738720
rcx            0x7fffffbcc257   140737483948631
rdx            0x7fffffbcc188   140737483948424
rsi            0x4a1bf8 4856824
rdi            0x687200 6844928
rbp            0x7fffffbce2a0   0x7fffffbce2a0
rsp            0x7fffffbcc188   0x7fffffbcc188
r8             0x2b76d8c5e581   47789442983297
r9             0x4      4
r10            0x1      1
r11            0x0      0
r12            0x2b76da64e000   47789470179328
r13            0x2b76d8e4c060   47789445005408
r14            0x2b76dc64f2b8   47789503738552
r15            0x2b76da64e9d8   47789470181848
rip            0x2b76d8c5e581   0x2b76d8c5e581 <sprintf+129>
eflags         0x10206  66054
cs             0x33     51
ss             0x2b     43
ds             0x0      0
es             0x0      0
fs             0x0      0
gs             0x0      0
(gdb) The program is running.  Exit anyway? (y or n) y
barbeque/zarathustra:games: uname -a
Linux zarathustra 2.6.16-rc5-g292b976d #1 PREEMPT Mon Mar 6 23:39:23 PST 2006 
x86_64 GNU/Linux
barbeque/zarathustra:games: cat /proc/cpuinfo
processor       : 0
vendor_id       : AuthenticAMD
cpu family      : 15
model           : 7
model name      : AMD Athlon(tm) 64 Processor 4000+
stepping        : 10
cpu MHz         : 2400.000
cache size      : 1024 KB
fpu             : yes
fpu_exception   : yes
cpuid level     : 1
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov 
pat pse36 clflush mmx fxsr sse sse2 syscall nx mmxext lm 3dnowext 3dnow
bogomips        : 4813.12
TLB size        : 1024 4K pages
clflush size    : 64
cache_alignment : 64
address sizes   : 40 bits physical, 48 bits virtual
power management: ts fid vid ttp

barbeque/zarathustra:games:
Script done on Sat Mar 11 13:11:32 2006


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to