Ok, this bug was fixed but not the actual bug I was after.

But finaly, thanks to libgc's debug message, I got it.
Actually, libgc overwrite pthread_create (and pthread_sigmask,
and a few more) to know when a new thread is started.
But this overloading is done "softly", ie. by a define in a
C header file.

The program I'm working on was composed of many compilation unit,
of which only a few include libguile (which then include gc.h).
Some of these compilation unit were calling pthread_create without
including libguile, and then when these threads were garbage
collecting libgc crashed.

So, in conclusion : always include libguile.h in the compilation
units calling pthread functions.

I would have prefered another solution, but I think we can live with
that, _if_ it's documented somewhere.

As a side note, I find libguile 1.9 slower than libguile 1.8.7.
I suppose, being an unstable version, it's compiled by default
with many debug options on. Is there an easy way to configure it
for fast execution, for benchmarking reason ?


Reply via email to