* pthread_support.c (GC_thread_exit_proc): Null out the tls key to prevent the
dtor function from being callled, since that would read freed memory.
svn path=/trunk/mono/; revision=109502
+2008-08-03 Zoltan Varga <vargaz@gmail.com>
+
+ * pthread_support.c (GC_thread_exit_proc): Null out the tls key to prevent the
+ dtor function from being callled, since that would read freed memory.
+
2008-05-23 Massimiliano Mantione <massi@ximian.com>
* alloc.c: Moved emitting "GC_EVENT_START" and "GC_EVENT_END" events
from "GC_maybe_gc" to "GC_try_to_collect_inner".
me = GC_lookup_thread(pthread_self());
GC_destroy_thread_local(me);
if (me -> flags & DETACHED) {
+# ifdef THREAD_LOCAL_ALLOC
+ /* NULL out the tls key to prevent the dtor function from being called */
+ if (0 != GC_setspecific(GC_thread_key, NULL))
+ ABORT("Failed to set thread specific allocation pointers");
+#endif
GC_delete_thread(pthread_self());
} else {
me -> flags |= FINISHED;