[PATCH] tsan: fix signal handling during stop-the-world

Dmitry Vyukov dvyukov at google.com
Tue Mar 3 05:16:12 PST 2015


Hi earthdok,

Long story short: stop-the-world briefly resets SIGSEGV handler to SIG_DFL.
This breaks programs that handle and continue after SIGSEGV (namely JVM).
See the test and comments for details.

This is reincarnation of reverted r229678 (http://reviews.llvm.org/D7722).
Changed:
- execute TracerThreadDieCallback only on tracer thread
- reset global data in TracerThreadSignalHandler/TracerThreadDieCallback
- handle EINTR from waitpid
Add 3 new test:
- SIGSEGV during leak checking
- StopTheWorld operation during signal storm from an external process
- StopTheWorld operation when the program generates and handles SIGSEGVs

http://reviews.llvm.org/D8032

Files:
  lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc
  test/asan/TestCases/Linux/leak_check_segv.cc
  test/asan/TestCases/Linux/signal_during_stop_the_world.cc
  test/sanitizer_common/TestCases/Linux/signal_segv_handler.cc

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D8032.21097.patch
Type: text/x-patch
Size: 14395 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150303/9693f7db/attachment.bin>


More information about the llvm-commits mailing list