[PATCH] tsan: fix signal handling during stop-the-world
Sergey Matveev
earthdok at google.com
Wed Feb 18 06:33:24 PST 2015
================
Comment at: lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc:253
@@ -252,3 @@
- new_sigaction.sa_flags = SA_ONSTACK | SA_SIGINFO;
- internal_sigfillset(&new_sigaction.sa_mask);
- internal_sigaction_norestorer(kUnblockedSignals[signal_index],
----------------
Why did you remove this?
================
Comment at: lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc:268
@@ -268,1 +267,3 @@
+ // it can call KillAllThreads on the destroyed variable.
+ SetDieCallback(old_die_callback);
thread_suspender_instance = NULL;
----------------
We shouldn't ever run TracerThreadDieCallback() from other threads. It wouldn't work anyway.
I think TracerThreadDieCallback() should check that internal_getpid() == stoptheworld_tracer_pid. If not, just call the old callback.
http://reviews.llvm.org/D7722
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the llvm-commits
mailing list