This is the mail archive of the
guile@sourceware.cygnus.com
mailing list for the Guile project.
Re: segfault in scm_gc_mark?
LW> Is there any reason I should get a segfault in scm_gc_mark? I'm using
LW> version 1.3, using an adaptation of binutils' i386 disassembler and
I've had my share of problems during GC, and it is always my
fault. Surprise! :-) My solution has been to use a construction such
as
#ifdef NDEBUG
#define GC_TRACE_MARK(S)
#else
#define GC_TRACE_MARK(S) { fprintf(stderr, "Marking a %s\n", S);}
#endif
and then put a
GC_TRACE_MARK("thingie")
in the mark function for the thingie smob. And the same for the free
function.
Works excellent. Have found several bugs this way.
Lars
--
Lars Arvestad Dept. of Numerical Analysis and Computing Science
Royal Institute of Technology (KTH), Stockholm, Sweden