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 77ef78a0a5dbaa364529bd05ed7a7bd9a71dd8d4. 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
AddressSanitizer RT
================================
This directory contains sources of the AddressSanitizer (ASan) runtime library.
Directory structure:
README.txt : This file.
Makefile.mk : File for make-based build.
CMakeLists.txt : File for cmake-based build.
asan_*.{cc,h} : Sources of the asan runtime library.
scripts/* : Helper scripts.
tests/* : ASan unit tests.
Also ASan runtime needs the following libraries:
lib/interception/ : Machinery used to intercept function calls.
lib/sanitizer_common/ : Code shared between various sanitizers.
ASan runtime currently also embeds part of LeakSanitizer runtime for
leak detection (lib/lsan/lsan_common.{cc,h}).
ASan runtime can only be built by CMake. You can run ASan tests
from the root of your CMake build tree:
make check-asan
For more instructions see:
https://github.com/google/sanitizers/wiki/AddressSanitizerHowToBuild