llvm-project/compiler-rt/include/sanitizer
Rainer Orth d83c9005cf [sanitizer_common][test] Enable tests on SPARC
Unfortunately, the `sanitizer_common` tests are disabled on many targets
that are supported by `sanitizer_common`, making it easy to miss issues
with that support.  This patch enables SPARC testing.

Beside the enabling proper, the patch fixes (together with D91607
<https://reviews.llvm.org/D91607>) the failures of the `symbolize_pc.cpp`,
`symbolize_pc_demangle.cpp`, and `symbolize_pc_inline.cpp` tests.  They
lack calls to `__builtin_extract_return_addr`.  When those are added, they
`PASS` when compiled with `gcc`.  `clang` incorrectly doesn't implement a
non-default `__builtin_extract_return_addr` on several targets, SPARC
included.

Because `__builtin_extract_return_addr(__builtin_return_addr(0))` is quite
a mouthful and I'm uncertain if the code needs to compile with msvc which
appparently has it's own `_ReturnAddress`, I've introduced
`__sanitizer_return_addr` to hide the difference and complexity.  Because
on 32-bit SPARC `__builtin_extract_return_addr` differs when the calling
function returns a struct, I've added a testcase for that.

There are a couple more tests failing on SPARC that I will deal with
separately.

Tested on `sparcv9-sun-solaris2.11`, `amd64-pc-solaris2.11`, and
`x86_64-pc-linux-gnu`.

Differential Revision: https://reviews.llvm.org/D91608
2022-02-01 22:33:56 +01:00
..
allocator_interface.h
asan_interface.h [compiler-rt] NFC: Fix trivial typo 2021-09-04 14:12:58 +05:30
common_interface_defs.h [sanitizer_common][test] Enable tests on SPARC 2022-02-01 22:33:56 +01:00
coverage_interface.h
dfsan_interface.h [DFSan] Add option for conditional callbacks. 2022-01-05 15:07:09 -08:00
hwasan_interface.h [hwasan] Implement error report callback. 2020-11-20 16:48:19 -08:00
linux_syscall_hooks.h [sanitizer] Add callbacks for epoll_pwait2 2021-08-02 14:14:19 -07:00
lsan_interface.h
memprof_interface.h [MemProf] Add interface to dump profile 2020-11-19 10:21:53 -08:00
msan_interface.h [MSAN] Add fiber switching APIs 2020-08-27 19:30:40 -07:00
netbsd_syscall_hooks.h [compiler-rt] [netbsd] Regenerate syscall hooks 2020-09-10 20:16:39 +02:00
scudo_interface.h
tsan_interface.h tsan: add a test for flushing memory 2021-09-24 15:59:19 +02:00
tsan_interface_atomic.h [Branch-Rename] Fix some links 2021-02-01 16:43:21 +05:30
ubsan_interface.h