diff options
author | Petr Hosek <phosek@chromium.org> | 2017-08-28 00:45:12 +0000 |
---|---|---|
committer | Petr Hosek <phosek@chromium.org> | 2017-08-28 00:45:12 +0000 |
commit | 00b760ed48234e8884dc05eff321df203060b6da (patch) | |
tree | 6cfc7240e80227cacf05dc977993ff7be598875b /compiler-rt/lib | |
parent | 8b633447dae1c4f3eca785c71eaffcc071e0c608 (diff) | |
download | bcm5719-llvm-00b760ed48234e8884dc05eff321df203060b6da.tar.gz bcm5719-llvm-00b760ed48234e8884dc05eff321df203060b6da.zip |
[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
llvm-svn: 311869
Diffstat (limited to 'compiler-rt/lib')
-rw-r--r-- | compiler-rt/lib/asan/tests/asan_interface_test.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/compiler-rt/lib/asan/tests/asan_interface_test.cc b/compiler-rt/lib/asan/tests/asan_interface_test.cc index 7d3e520d81a..03351e02b2f 100644 --- a/compiler-rt/lib/asan/tests/asan_interface_test.cc +++ b/compiler-rt/lib/asan/tests/asan_interface_test.cc @@ -423,3 +423,11 @@ TEST(AddressSanitizerInterface, GetOwnershipStressTest) { free(pointers[i]); } +TEST(AddressSanitizerInterface, HandleNoReturnTest) { + char array[40]; + __asan_poison_memory_region(array, sizeof(array)); + BAD_ACCESS(array, 20); + __asan_handle_no_return(); + // It unpoisons the whole thread stack. + GOOD_ACCESS(array, 20); +} |