Hi, On Tue 06 Jan 2015 15:27, Anthonin Bonnefoy <anthonin.bonne...@securactive.net> writes:
> Example program: > ``` > #include <stdlib.h> > #include <pthread.h> > #include <libguile.h> I had to add <libguile/bdw-gc.h> to this to get it to compile on 2.2. I wonder if that's a problem? Anyway it segfaults directly on 2.2: [Switching to Thread 0x7ffff44d1700 (LWP 8284)] 0x00007ffff785f9ab in return_freelists () from /gnu/store/y8ppqsxiki39n4mqpb4mab6bgwqsnnp7-libgc-7.4.2/lib/libgc.so.1 (gdb) bt #0 0x00007ffff785f9ab in return_freelists () from /gnu/store/y8ppqsxiki39n4mqpb4mab6bgwqsnnp7-libgc-7.4.2/lib/libgc.so.1 #1 0x00007ffff785fad8 in GC_destroy_thread_local () from /gnu/store/y8ppqsxiki39n4mqpb4mab6bgwqsnnp7-libgc-7.4.2/lib/libgc.so.1 #2 0x00007ffff7861c4d in GC_unregister_my_thread_inner () from /gnu/store/y8ppqsxiki39n4mqpb4mab6bgwqsnnp7-libgc-7.4.2/lib/libgc.so.1 #3 0x00007ffff7862291 in GC_unregister_my_thread () from /gnu/store/y8ppqsxiki39n4mqpb4mab6bgwqsnnp7-libgc-7.4.2/lib/libgc.so.1 #4 0x00007ffff74134c9 in __nptl_deallocate_tsd () at pthread_create.c:175 #5 0x00007ffff74145ba in __nptl_deallocate_tsd () at pthread_create.c:326 #6 start_thread (arg=0x7ffff44d1700) at pthread_create.c:346 Looks like I am doubly unregistering the thread. After landing a fix, I can't repro the bug any more in master. I bet in 2.0, Guile is itself doing GC_unregister_my_thread() even though the GC_pthread_create should be handling that. Andy