summaryrefslogtreecommitdiff
path: root/compiler-rt/include
diff options
context:
space:
mode:
authorPetr Hosek <phosek@chromium.org>2017-08-28 00:45:12 +0000
committerPetr Hosek <phosek@chromium.org>2017-08-28 00:45:12 +0000
commit6ef878626607ffec99f9aa3289e9d85c3b34d640 (patch)
tree42a4682cfb93fb70f2079dd1fe4aec64b2635df7 /compiler-rt/include
parent9014229c35bf0ec394ecb48bb62720627995d98a (diff)
[asan] Move __asan_handle_no_return to public header
Heretofore asan_handle_no_return was used only by interceptors, i.e. code private to the ASan runtime. However, on systems without interceptors, code like libc++abi is built with -fsanitize=address itself and should call asan_handle_no_return directly from __cxa_throw so that no interceptor is required. Patch by Roland McGrath Differential Revision: https://reviews.llvm.org/D36811
Diffstat (limited to 'compiler-rt/include')
-rw-r--r--compiler-rt/include/sanitizer/asan_interface.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/compiler-rt/include/sanitizer/asan_interface.h b/compiler-rt/include/sanitizer/asan_interface.h
index 97ba0ceb0b2..e689a730e2c 100644
--- a/compiler-rt/include/sanitizer/asan_interface.h
+++ b/compiler-rt/include/sanitizer/asan_interface.h
@@ -144,6 +144,10 @@ extern "C" {
void *__asan_addr_is_in_fake_stack(void *fake_stack, void *addr, void **beg,
void **end);
+ // 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(void);
+
#ifdef __cplusplus
} // extern "C"
#endif