[Mono-bugs] [Bug 537764] Mono crashes on OS X Snow Leopard

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Sun Oct 18 09:49:22 EDT 2009


http://bugzilla.novell.com/show_bug.cgi?id=537764

User laurent.etiemble at gmail.com added comment
http://bugzilla.novell.com/show_bug.cgi?id=537764#c14





--- Comment #14 from Laurent Etiemble <laurent.etiemble at gmail.com>  2009-10-18 07:49:17 MDT ---
The re-registration of the dying thread is linked to the way Monobjc bridges
the Objective-C runtime. In Snow Leopard, the NSThreadWillExitNotification is
posts AFTER all the thread's clean-up calls. So when the exit notification is
deallocated, the Monobjc bridge is invoked, leading to the re-registration of
the thread. And as the clean-up is already done, there is no means
store/retrieve the fact that the thread is gone (according to my tests and to
my light knowledge of the Mach/BSD kernel API).

One possible fix may be to mark the thread as stalled if the thread_get_state
call fails, and then to clean-up all the threads flagged as stalled at the end
of the GC_push_all_stacks function. This way, we ensure that dead threads are
unregistered and that memory does not leak.

-- 
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the mono-bugs mailing list