GNOME Bugzilla – Bug 733065
thread_specific_ptr + dlclose library causes a SIGSEGV.
Last modified: 2017-12-11 11:23:54 UTC
Created attachment 280506 [details] Sample to reproduce issue This issue is similar to https://svn.boost.org/trac/boost/ticket/3926 spawn thread dlopen a shared library which uses libglib dlclose the library terminate the thread observe the gpf: Program received signal SIGSEGV, Segmentation fault.
+ Trace 233805
Thread 140737343592192 (LWP 24044)
To reproduce please run attached sample: gcc main.c -lpthread -ldl -g -o main && ./main Looks like libglib doesn't clean up pthread key, since pthread_key_delete(1) solves the issue for me. Another similar issue: https://bugs.launchpad.net/ubuntu/+source/vlc/+bug/730232/comments/5
We don't support dlclose on libgobject or above (including gio, gtk+).
See e.g. http://cgit.freedesktop.org/libfprint/fprintd/commit/?id=00ac488cde0f9b916d58af2c1d4f1ae9e05293d0
*** Bug 791462 has been marked as a duplicate of this bug. ***