[gambit-list] Termite, IO and memory leakage
nwalton at mac.com
Tue Nov 25 10:51:07 EST 2008
Many thanks for that. The code is pure R5RS until it hits Termite of course, no #!key or #!rest variables anywhere to be seen. All I/O is done by write, display or newline.
I strongly suspect the problem is in Termite since weird things happen eg if I replace the (+ j j) in the example code with (newline)(write ..) I get the problem, but I also get the problem if I replace it with
(if #t (+ j j) (begin (newline) (write ...)))
Termite seems to pick up the possible I/O and crashes even if I/O is never executed. I therefore suspect a problem in the serialisation of ports but I can't be sure.
On Tuesday, November 25, 2008, at 01:48PM, "Christian Jaeger" <christian at pflanze.mine.nu> wrote:
>Nicholas Walton wrote:
>> Any ideas please?
>I can't really say anything about the memory leaking (I'm not a regular
>Regarding the segv's/bus errors, run the code under gdb and look at or
>show the backtrace, this should give a clue on what's happening. Compile
>with cc-options -g and with options keep-c or track-scheme for better
>Just to be sure, check whether you're using |print| or |println| or
>defining own functions using both the #!key and #!rest syntax at the
>same time, since Gambit has (afaik still) a known problem in the GC when
>calling such procedures (it is triggered only when a GC happens in the
>right place, so you'll only see it when you're calling such procedures
>People having time to debug (not me currently) might appreciate a
>complete example to reproduce the problem.
More information about the Gambit-list