Fix a race in the posix suspend code that would lead to a crash.
authorRodrigo Kumpera <kumpera@gmail.com>
Thu, 14 Feb 2013 23:39:32 +0000 (18:39 -0500)
committerRodrigo Kumpera <kumpera@gmail.com>
Thu, 14 Feb 2013 23:39:32 +0000 (18:39 -0500)
commitafd1b3b8c68077d920883041d13d7b68bb0e1bf7
tree1229c4f6df2ff3d399de2e8cab69638a6a22f656
parentab1fd9bde6f258fa6c5ba8e1ba9829cf4127e54e
Fix a race in the posix suspend code that would lead to a crash.

* mono-threads-posix.c: If we get the suspend signal while the thread
is detaching, we end up with a non null thread info but a null jit info.
This leads to thread_state_init_from_sigctx returning false. The
solution on this case is not to crash, but to tell the suspender
that the current suspend attempt failed.

Fixes an intermittent crash on the linux bots.
mono/utils/mono-threads-posix.c
mono/utils/mono-threads.h