GNOME Bugzilla – Bug 704523
g_thread_create_full() can dereference NULL pointer
Last modified: 2013-07-22 07:56:07 UTC
Moving this from a downstream bug report: https://bugzilla.redhat.com/show_bug.cgi?id=986124 The compatibility function g_thread_create_full() can dereference NULL 'thread' variable, if the actual thread creation fails and returns NULL. Core was generated by `/usr/libexec/evolution-addressbook-factory'. Program terminated with signal 11, Segmentation fault. 0 g_thread_create_full (func=<optimized out>, data=<optimized out>, stack_size=stack_size@entry=0, joinable=0, bound=bound@entry=0, priority=priority@entry=G_THREAD_PRIORITY_LOW, error=0x0) at deprecated/gthread-deprecated.c:377 377 thread->joinable = FALSE;
+ Trace 232268
Thread 1 (Thread 0x7fef05d4a700 (LWP 27569))
Created attachment 249581 [details] [review] proposed glib patch One-liner, to not dereference the NULL pointer.
Review of attachment 249581 [details] [review]: Looks ok to me. It'll only delay the inevitable a little bit for you, but it is nicer return NULL than to segfault inside glib.
Created commit 64041ca in glib master (2.37.5+)