llvm-project/compiler-rt/test/hwasan/TestCases
David Tellenbach 67474c60d3 [compiler-rt] libhwasan interceptor ABI intercept longjmp/setjmp
Summary:
The hwasan interceptor ABI doesn't have interceptors for longjmp and setjmp.
This patch introduces them.

We require the size of the jmp_buf on the platform to be at least as large as
the jmp_buf in our implementation. To enforce this we compile
hwasan_type_test.cpp that ensures a compile time failure if this is not true.

Tested on both GCC and clang using an AArch64 virtual machine.

Reviewers: eugenis, kcc, pcc, Sanatizers

Reviewed By: eugenis, Sanatizers

Tags: #sanatizers, #llvm

Differential Revision: https://reviews.llvm.org/D69045

Patch By: Matthew Malcomson <matthew.malcomson@arm.com>
2019-10-30 14:04:40 +00:00
..
Linux hwasan: Untag global variable addresses in tests. 2019-08-05 21:46:10 +00:00
Posix [hwasan] Remove system allocator fallback. 2019-10-18 22:36:25 +00:00
abort-message-android.cpp compiler-rt: Rename .cc file in test/hwasan to .cpp 2019-08-05 13:10:50 +00:00
allocator_returns_null.cpp hwasan: Untag global variable addresses in tests. 2019-08-05 21:46:10 +00:00
cfi.cpp Require lld for hwasan tests. 2019-08-06 23:43:20 +00:00
check-interface.cpp compiler-rt: Rename .cc file in test/hwasan to .cpp 2019-08-05 13:10:50 +00:00
deep-recursion.c Fix typo in test cases as well. 2018-12-15 07:08:04 +00:00
double-free.c [hwasan] use thread-local ring buffers to properly report heap-use-after-free 2018-08-30 22:11:56 +00:00
global.c hwasan: Instrument globals. 2019-08-06 22:07:29 +00:00
halt-on-error.cpp compiler-rt: Rename .cc file in test/hwasan to .cpp 2019-08-05 13:10:50 +00:00
heap-buffer-overflow.c hwasan: Untag global variable addresses in tests. 2019-08-05 21:46:10 +00:00
hwasan-print-shadow.cpp compiler-rt: Rename .cc file in test/hwasan to .cpp 2019-08-05 13:10:50 +00:00
longjmp-setjmp-interception.c [compiler-rt] libhwasan interceptor ABI intercept longjmp/setjmp 2019-10-30 14:04:40 +00:00
longjmp.c [hwasan] make error reporting look more like in asan, print the memory tag around the buggy access, simplify one test 2018-08-22 22:55:16 +00:00
malloc-test.c [hwasan] Fix new[] with zero size. 2018-08-31 17:49:49 +00:00
malloc_bisect.c Runtime flags for malloc bisection. 2019-02-15 18:38:14 +00:00
malloc_fill.cpp hwasan: Untag global variable addresses in tests. 2019-08-05 21:46:10 +00:00
many-threads-uaf.c hwasan: Untag global variable addresses in tests. 2019-08-05 21:46:10 +00:00
mem-intrinsics-zero-size.c hwasan: Ignore loads and stores of size 0. 2019-01-09 00:44:13 +00:00
mem-intrinsics.c hwasan: Untag global variable addresses in tests. 2019-08-05 21:46:10 +00:00
new-test.cpp compiler-rt: Rename .cc file in test/hwasan to .cpp 2019-08-05 13:10:50 +00:00
override-new-delete.cpp Set an output file name for the override-new-delete.cpp test. 2019-06-07 02:30:58 +00:00
print-memory-usage-android.c [hwasan] Re-enable print-memory-usage-android test. 2018-09-10 22:22:02 +00:00
print-memory-usage.c [hwasan] relax the rint-memory-usage.c test further 2018-09-07 01:36:34 +00:00
print-module-map.c [hwasan] Implement print_module_map flag. 2019-01-25 02:05:25 +00:00
pthread_exit.c [hwasan] fix pthread_exit 2018-09-06 22:13:43 +00:00
realloc-after-free.c [hwasan] use thread-local ring buffers to properly report heap-use-after-free 2018-08-30 22:11:56 +00:00
realloc-test.cpp compiler-rt: Rename .cc file in test/hwasan to .cpp 2019-08-05 13:10:50 +00:00
register-dump-no-fp.cpp compiler-rt: Rename .cc file in test/hwasan to .cpp 2019-08-05 13:10:50 +00:00
register-dump-read.c [HWASan] Save + print registers when tag mismatch occurs in AArch64. 2019-03-08 21:22:35 +00:00
rich-stack.c [hwasan] Record and display stack history in stack-based reports. 2018-09-24 23:03:34 +00:00
sanitizer_malloc.cpp compiler-rt: Rename .cc file in test/hwasan to .cpp 2019-08-05 13:10:50 +00:00
sizes.cpp hwasan: Untag global variable addresses in tests. 2019-08-05 21:46:10 +00:00
stack-history-length.c hwasan: Use bits [3..11) of the ring buffer entry address as the base stack tag. 2019-06-17 23:39:51 +00:00
stack-oob.c hwasan: Compatibility fixes for short granules. 2019-09-27 01:02:10 +00:00
stack-uar-dynamic.c hwasan: Teach the runtime to identify the local variable being accessed in UAR reports. 2019-06-27 23:16:13 +00:00
stack-uar-realign.c hwasan: Teach the runtime to identify the local variable being accessed in UAR reports. 2019-06-27 23:16:13 +00:00
stack-uar.c hwasan: Teach the runtime to identify the local variable being accessed in UAR reports. 2019-06-27 23:16:13 +00:00
tag_in_free.c Fix false positive when tag_in_malloc=0,tag_in_free=1. 2019-02-15 18:38:03 +00:00
tail-magic.c [hwasan] Fix typo in the error type. 2019-10-28 13:25:45 -07:00
thread-uaf.c [hwasan] print all threads in a bug report 2018-10-10 18:56:31 +00:00
try-catch.cpp [hwasan] Workaround unwinder issues in try-catch test. 2019-10-21 23:57:12 +00:00
uaf_with_rb_distance.c [hwasan] On every use-after-free print a developer note: the index of this heap object in the thread's deallocation ring buffer. Mostly useful to hwasan developers, will hopefully let us know the good size of the deallocation ring buffer 2018-09-12 00:58:15 +00:00
use-after-free.c hwasan: Untag global variable addresses in tests. 2019-08-05 21:46:10 +00:00
utils.h hwasan: Untag global variable addresses in tests. 2019-08-05 21:46:10 +00:00