[PATCH] asan: fix signal handling during stoptheworld

Dmitry Vyukov dvyukov at google.com
Mon Mar 2 07:32:05 PST 2015


Hi earthdok,

The problem is that without SA_RESTORER flag, kernel ignores the handler. So tracer actually did not setup any handler.
Add SA_RESTORER flag when setting up handlers.
Add a test that causes SIGSEGV in stoptheworld callback.
Move SignalContext from asan to sanitizer_common to print better diagnostics about signal in the tracer thread.

http://reviews.llvm.org/D8005

Files:
  lib/asan/asan_internal.h
  lib/asan/asan_linux.cc
  lib/asan/asan_mac.cc
  lib/asan/asan_posix.cc
  lib/sanitizer_common/sanitizer_common.h
  lib/sanitizer_common/sanitizer_linux.cc
  lib/sanitizer_common/sanitizer_mac.cc
  lib/sanitizer_common/sanitizer_posix.cc
  lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc
  lib/sanitizer_common/tests/sanitizer_stoptheworld_test.cc
  lib/tsan/rtl/tsan_interceptors.cc
  lib/tsan/rtl/tsan_rtl.h

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D8005.21007.patch
Type: text/x-patch
Size: 18174 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150302/1cd7a3eb/attachment.bin>


More information about the llvm-commits mailing list