Hi Luca! Luca Saiu <posit...@gnu.org> writes:
> I've reproduced the problem by using the example in > doc/example-smob/ > which is much simpler than my own code; the failure is identical. > > [luca@optimum > ~/projects-by-others/guile-from-git-mainline/doc/example-smob]$ ./myguile > GNU Guile 1.9.15.114-b81eb > Copyright (C) 1995-2011 Free Software Foundation, Inc. > > Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'. > This program is free software, and you are welcome to redistribute it > under certain conditions; type `,show c' for details. > > Enter `,help' for help. > scheme@(guile-user)> make-image > $1 = #<procedure make-image (_ _ _)> > scheme@(guile-user)> (define i (make-image "Whistler's Mother" 100 100)) > scheme@(guile-user)> i > $2 = #<image Whistler's Mother> > scheme@(guile-user)> (gc) > scheme@(guile-user)> (gc) > The current thread is at (nil); Segmentation fault > > gdb says that the problem is in smob.c, in the smob_mark function: > SCM_I_CURRENT_THREAD->current_mark_stack_ptr = mark_stack_ptr; > A quick printf showed me that the SCM_I_CURRENT_THREAD macro returned NULL. > > This happens on an x86_64 GNU/Linux machine, guile from today's git; 1.8 > doesn't crash. I can’t reproduce the problem on x86_64-linux-gnu with a recent CVS snapshot of libgc. Which libgc do you use? Thanks, Ludo’.