llvm-project/compiler-rt/lib
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
..
BlocksRuntime
asan [gn build] slighly reformat files to make sync script work 2022-01-27 20:09:04 -05:00
builtins [compiler-rt][builtins] Use c[tl]zsi macro instead of __builtin_c[tl]z 2022-01-30 23:04:07 +03:00
cfi sanitizer_common: prefix thread-safety macros with SANITIZER_ 2022-01-07 15:11:00 +01:00
crt Control-flow Enforcement Technology (CET), published by Intel, introduces 2022-01-10 11:01:11 +08:00
dfsan [NFC][DFSan] Cleanup code to use align functions. 2022-01-06 14:42:38 -08:00
fuzzer [libc++] Disable coverage with sanitize-coverage=0 2022-01-07 17:53:21 -08:00
gwp_asan Fix a few warnings (signed/unsigned comparison in gtest, and missing field initializers) 2021-10-16 22:43:57 -07:00
hwasan [HWASan] Leave pointer tagged when calling memmove. 2022-01-28 06:15:38 -08:00
interception [sanitizers] Silence warnings about unused variables in i386 build. NFC. 2022-01-28 12:30:38 +02:00
lsan [ASan][Darwin] Avoid crash during ASan initialization 2022-01-07 12:28:38 -08:00
memprof [memprof] Move the meminfo block struct to MemProfData.inc. 2022-01-31 15:04:41 -08:00
msan [msan][tsan] Refine __fxstat{,at}{,64} condition 2022-01-28 09:15:39 -08:00
orc [CMake] Use generator expression to get in-tree libc++ path 2022-01-26 14:12:48 -08:00
profile [InstrProf] Add single byte coverage mode 2022-01-27 17:38:55 -08:00
safestack Revert "sanitizers: increase .clang-format columns to 100" 2021-07-28 09:40:21 +02:00
sanitizer_common [sanitizer_common][test] Enable tests on SPARC 2022-02-01 22:33:56 +01:00
scudo [CMake] Use generator expression to get in-tree libc++ path 2022-01-26 14:12:48 -08:00
stats [compiler-rt] separate lsan, ubsan, stats configuration from SANITIZER_COMMON_SUPPORTED_OS 2021-11-10 19:16:20 -08:00
tsan [msan][tsan] Refine __fxstat{,at}{,64} condition 2022-01-28 09:15:39 -08:00
ubsan [gn build] slighly reformat files to make sync script work 2022-01-27 20:09:04 -05:00
ubsan_minimal [compiler-rt] separate lsan, ubsan, stats configuration from SANITIZER_COMMON_SUPPORTED_OS 2021-11-10 19:16:20 -08:00
xray [CMake] Use generator expression to get in-tree libc++ path 2022-01-26 14:12:48 -08:00
CMakeLists.txt [ORC-RT] Re-apply "Initial ORC Runtime directories and build..." with fixes. 2021-04-24 16:00:20 -07:00