Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRodrigo Kumpera <kumpera@gmail.com>2014-11-21 02:32:53 +0300
committerRodrigo Kumpera <kumpera@gmail.com>2014-11-21 02:35:21 +0300
commitbf54221823831d82019711169880367f68a372a0 (patch)
tree285d42f6d75c4bf40e6c5907b4776b740ec4ec5a
parentf9afcf06b9b9fde45f3efc4824c762bf697e4b37 (diff)
[jit] Don't sample threads that are not fully attached.
-rw-r--r--mono/mini/mini-posix.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/mono/mini/mini-posix.c b/mono/mini/mini-posix.c
index 600940e5d50..1b1f722edb2 100644
--- a/mono/mini/mini-posix.c
+++ b/mono/mini/mini-posix.c
@@ -395,6 +395,9 @@ MONO_SIG_HANDLER_FUNC (static, sigprof_signal_handler)
if (mono_thread_info_get_small_id () == -1)
return; //an non-attached thread got the signal
+ if (!mono_domain_get () || !mono_native_tls_get_value (mono_jit_tls_id))
+ return; //thread in the process of dettaching
+
hp_save_index = mono_hazard_pointer_save_for_signal_handler ();
/* If we can't consume a profiling request it means we're the initiator. */