[gambit-list] Xlib

David Bridgham dab at froghouse.org
Thu Jan 13 18:20:28 EST 2011


On 01/12/2011 10:57 PM, Marc Feeley wrote:
> There used to be many memory leaks, but that has been fixed (using release functions).  I did notice a leak (of 3KB) when I tried the code, but it seems that it is Xlib itself that is leaking.
>   

I'm sorry to report that it looks like one of those release functions
may have a bug.  Running on a Debian Linux AMD64 system, I just
downloaded 4.6 and built it, I get this when I run the bounce demo:

 > make run
../../gsi/gsi -:~~bin=../../bin,~~lib=../../lib,~~include=../../include
Xlib -e '(load "bounce") (main)'
*** glibc detected *** ../../gsi/gsi: munmap_chunk(): invalid pointer:
0x00000000019d6900 ***
======= Backtrace: =========
/lib/libc.so.6(+0x71ad6)[0x2ac811122ad6]
/usr/lib/libX11.so.6(XFree+0x9)[0x2ac811ac1ec9]
/home/dab/src/gambc-v4_6_0/examples/Xlib-simple/Xlib.o1(XFree_Screen+0x9)[0x2ac811431bc8]
../../gsi/gsi(___release_foreign+0x4d)[0x4c6832]
../../gsi/gsi(___garbage_collect+0x9b0)[0x4c42f9]
../../gsi/gsi[0x4deedd]
../../gsi/gsi(___call+0x114)[0x4c1103]
../../gsi/gsi(___setup+0xf47)[0x4c20bb]
../../gsi/gsi(___main+0x9c5)[0x4d6eba]
../../gsi/gsi(___main_char+0x66)[0x4cb32d]
../../gsi/gsi(main+0x15)[0x4bf8b5]
/lib/libc.so.6(__libc_start_main+0xfd)[0x2ac8110cfc4d]
../../gsi/gsi[0x4bd369]
======= Memory map: ========
[ . . . ]

I'd like to report to you that I've found and fixed the problem but I
haven't.

 -Dave




More information about the Gambit-list mailing list