diff options
author | Derek Bruening <bruening@google.com> | 2016-05-31 13:21:03 +0000 |
---|---|---|
committer | Derek Bruening <bruening@google.com> | 2016-05-31 13:21:03 +0000 |
commit | 0573d6c7f326a08eeff6e595fd77045a0210c32a (patch) | |
tree | 9da5bc281151889b2b8b836cbf9373fb94105a2d /lib/esan/working_set.h | |
parent | 124601f8dc708132bf13ccdfbe927b8118b68136 (diff) |
[esan] Intercept and chain signal handlers
Summary:
In preparation for fault-based shadow memory iteration, we add support for
our own signal handler by adding app signal handler interception as well as
chaining for SIGSEGV. This is done in a simple manner: we do not honor the
app's alternate stack nor any sigaction flags for SIGSEGV.
Adds a new test of transparency in app signal handling.
Reviewers: aizatsky
Subscribers: filcab, kubabrecka, vitalybuka, zhaoqin, kcc, eugenis, llvm-commits
Differential Revision: http://reviews.llvm.org/D20577
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@271272 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/esan/working_set.h')
-rw-r--r-- | lib/esan/working_set.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/esan/working_set.h b/lib/esan/working_set.h index 4b1bc1596..3750a480a 100644 --- a/lib/esan/working_set.h +++ b/lib/esan/working_set.h @@ -25,6 +25,12 @@ int finalizeWorkingSet(); void processRangeAccessWorkingSet(uptr PC, uptr Addr, SIZE_T Size, bool IsWrite); +// Platform-dependent. +void registerMemoryFaultHandler(); +bool processWorkingSetSignal(int SigNum, void (*Handler)(int), + void (**Result)(int)); +bool processWorkingSetSigaction(int SigNum, const void *Act, void *OldAct); + } // namespace __esan #endif // WORKING_SET_H |