This is an archive of the discontinued LLVM Phabricator instance.

[ASan] Move the SIGSEGV/SIGBUS handling to sanitizer_common
ClosedPublic

Authored by glider on Jan 28 2014, 7:50 AM.

Details

Reviewers
kcc
samsonov
Summary

This change is a part of refactoring intended to have common signal handling behavior in all tools.
This particular CL moves InstallSignalHandlers() into sanitizer_common (making it InstallDeadlySignalHandlers()), but doesn't enable default signal handlers for any tool other than ASan.

Diff Detail

Event Timeline

glider updated this revision to Unknown Object (????).Jan 31 2014, 4:08 AM

Introduced the Linux version of internal_sigaction and made InstallDeadlySignalHandlers use it (we don't need any changes to interception/*)

kcc added a comment.Jan 31 2014, 4:36 AM

LGTM, but please let samsonov review too.

samsonov accepted this revision.Jan 31 2014, 5:01 AM

LGTM (but please address nits)

asan/asan_interceptors.cc
206

You don't need WEAK here.

asan/asan_internal.h
74

AsanOnSIGSEGV

sanitizer_common/sanitizer_posix_libcdep.cc
123

static void MaybeInstallSigaction

140

remove __sanitizer::

glider updated this revision to Unknown Object (????).Jan 31 2014, 5:14 AM

Addressed Alexey's comments, fixed compilation on OSX

asan/asan_interceptors.cc
206

Done

asan/asan_internal.h
74

Done

sanitizer_common/sanitizer_posix_libcdep.cc
123

Done

140

Done

Eugene.Zelenko closed this revision.Oct 3 2016, 6:49 PM
Eugene.Zelenko added a subscriber: Eugene.Zelenko.

Committed in rL200542.