This is an archive of the discontinued LLVM Phabricator instance.

asan: fix signal handling during stoptheworld
AbandonedPublic

Authored by dvyukov on Mar 2 2015, 7:32 AM.

Details

Reviewers
earthdok
Summary

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.

Diff Detail

Event Timeline

dvyukov updated this revision to Diff 21007.Mar 2 2015, 7:32 AM
dvyukov retitled this revision from to asan: fix signal handling during stoptheworld.
dvyukov updated this object.
dvyukov edited the test plan for this revision. (Show Details)
dvyukov added a reviewer: earthdok.
dvyukov added a subscriber: Unknown Object (MLST).
earthdok edited edge metadata.Mar 2 2015, 9:09 AM

lgtm w/nit

lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc
106

why?

dvyukov added inline comments.Mar 2 2015, 9:37 AM
lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc
106

as per offline discussion the comment is revoked
it is not super important to be logged on the maximum verbosity level

dvyukov abandoned this revision.Apr 15 2021, 1:20 AM