diff options
author | Kostya Serebryany <kcc@google.com> | 2012-02-08 21:33:27 +0000 |
---|---|---|
committer | Kostya Serebryany <kcc@google.com> | 2012-02-08 21:33:27 +0000 |
commit | f54b1f9b73a6855d77ee270c282bd61407fa73a0 (patch) | |
tree | 05f972db000db489471116bc1517f8ead4d41579 /lib/asan/asan_interface.h | |
parent | 5b29018cf422e7711fb760b733c32127397a43fc (diff) | |
download | compiler-rt-f54b1f9b73a6855d77ee270c282bd61407fa73a0.tar.gz |
[asan] unpoison the stack before every noreturn call. Fixes asan issue 37. rt part
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@150101 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/asan/asan_interface.h')
-rw-r--r-- | lib/asan/asan_interface.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/asan/asan_interface.h b/lib/asan/asan_interface.h index 7f4fdbe04..eb7d87d09 100644 --- a/lib/asan/asan_interface.h +++ b/lib/asan/asan_interface.h @@ -79,6 +79,10 @@ extern "C" { // (un)poison memory in the same memory region simultaneously. void __asan_unpoison_memory_region(void const volatile *addr, size_t size); + // Performs cleanup before a NoReturn function. Must be called before things + // like _exit and execl to avoid false positives on stack. + void __asan_handle_no_return(); + // User code should use macro instead of functions. #if defined(__has_feature) && __has_feature(address_sanitizer) #define ASAN_POISON_MEMORY_REGION(addr, size) \ |