llvm-project/compiler-rt/test
Alex Richardson ad294e572b [sanitizers] Fix interception of GLibc regexec
Previously, on GLibc systems, the interceptor was calling __compat_regexec
(regexec@GLIBC_2.2.5) insead of the newer __regexec (regexec@GLIBC_2.3.4).
The __compat_regexec strips the REG_STARTEND flag but does not report an
error if other flags are present. This can result in infinite loops for
programs that use REG_STARTEND to find all matches inside a buffer (since
ignoring REG_STARTEND means that the search always starts from the first
character).

The underlying issue is that GLibc's dlsym(RTLD_NEXT, ...) appears to
always return the oldest versioned symbol instead of the default. This
means it does not match the behaviour of dlsym(RTLD_DEFAULT, ...) or the
behaviour documented in the manpage.

It appears a similar issue was encountered with realpath and worked around
in 77ef78a0a5.

See also https://sourceware.org/bugzilla/show_bug.cgi?id=14932 and
https://sourceware.org/bugzilla/show_bug.cgi?id=1319.

Fixes https://github.com/google/sanitizers/issues/1371

Reviewed By: #sanitizers, vitalybuka, marxin

Differential Revision: https://reviews.llvm.org/D96348
2021-03-08 10:53:55 +00:00
..
BlocksRuntime
asan [asan][test] Handle Solaris in large_func_test.cpp etc. 2021-03-06 01:28:17 +01:00
builtins Reland "[builtins] Define fmax and scalbn inline" 2021-02-26 16:20:14 -08:00
cfi [android] Fix some tests for AOSP-master devices. 2021-01-05 12:54:09 -08:00
crt [CMake] Rename RUNTIMES_BUILD to LLVM_RUNTIMES_BUILD 2021-03-03 10:58:51 -08:00
dfsan [dfsan] Re-enable origin tracking test cases 2021-03-06 02:41:56 +00:00
fuzzer [Fuzzer][Test] Use %python substitution for trace-malloc-unbalanced.test 2021-02-17 15:00:46 +00:00
gwp_asan [GWP-ASan] Split the unwinder into segv/non-segv. 2020-07-21 08:25:37 -07:00
hwasan Hwasan InitPrctl check for error using internal_iserror 2021-02-19 16:30:56 +00:00
interception
lsan [sanitizer] [arm] Disable some LSAN tests for arm-linux-gnueabihf 2021-02-15 09:35:02 -03:00
memprof [NFC,memprof] Update test after D96319 2021-02-11 16:36:16 -08:00
msan [test] Fix unused FileCheck prefixes in compiler-rt 2021-02-01 22:32:13 -08:00
profile [profile][test] Pin Linux/instrprof-value-prof-warn.test to -fuse-ld=bfd 2021-03-05 00:52:25 -08:00
safestack
sanitizer_common [sanitizers] Fix interception of GLibc regexec 2021-03-08 10:53:55 +00:00
scudo [scudo][standalone] Restore GWP-ASan flag parsing 2021-01-27 12:35:34 -08:00
shadowcallstack
tsan tsan: fix mmap_lots test 2021-02-17 19:03:17 +01:00
ubsan [Sanitizer] Fix sanitizer tests without reducing optimization levels 2021-02-11 15:22:20 -08:00
ubsan_minimal [test] Fix unused FileCheck prefixes in compiler-rt 2021-02-01 22:32:13 -08:00
xray Fix xray fdr mode to allow multiple flushes 2021-02-10 12:57:24 +11:00
.clang-format
.clang-tidy [NFC][compiler-rt] Refine .clang-tidy checks 2020-09-05 15:42:15 -07:00
CMakeLists.txt Partially revert "[runtimes] Use add_lit_testsuite to register lit testsuites" 2021-03-05 15:24:38 -08:00
lit.common.cfg.py [darwin][asan] add test for application specific information in crash logs 2021-02-23 09:22:11 -08:00
lit.common.configured.in [sanitizer] Fix Android API level parsing on arm 2020-11-14 01:54:45 -08:00