llvm-project/compiler-rt/lib
Peter Wu 1db004ebdd [ASAN] Fix crash on i?86-linux (32-bit) against glibc 2.27 and later
Summary:
Running sanitized 32-bit x86 programs on glibc 2.27 crashes at startup, with:

    ERROR: AddressSanitizer: SEGV on unknown address 0xf7a8a250 (pc 0xf7f807f4 bp 0xff969fc8 sp 0xff969f7c T16777215)
    The signal is caused by a WRITE memory access.
    #0 0xf7f807f3 in _dl_get_tls_static_info (/lib/ld-linux.so.2+0x127f3)
    #1 0xf7a92599  (/lib/libasan.so.5+0x112599)
    #2 0xf7a80737  (/lib/libasan.so.5+0x100737)
    #3 0xf7f7e14f in _dl_init (/lib/ld-linux.so.2+0x1014f)
    #4 0xf7f6eb49  (/lib/ld-linux.so.2+0xb49)

The problem is that glibc changed the calling convention for the GLIBC_PRIVATE
symbol that sanitizer uses (even when it should not, GLIBC_PRIVATE is exactly
for symbols that can change at any time, be removed etc.), see
https://sourceware.org/ml/libc-alpha/2017-08/msg00497.html

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

Patch By: Jakub Jelinek

Reviewed By: vitalybuka, Lekensteyn

Differential Revison: https://reviews.llvm.org/D44623

llvm-svn: 334363
2018-06-10 11:17:47 +00:00
..
BlocksRuntime [compiler-rt] Test commit: remove some trailing white spaces. 2017-08-25 19:36:30 +00:00
asan [asan, myriad] Use local pool for new/delete when ASan run-time is not up 2018-06-08 21:49:38 +00:00
builtins Revert "[cmake] [ARM] Check if VFP is supported before including any VFP builtins" 2018-05-24 21:36:27 +00:00
cfi [sanitizer] Build failures fixes post D45457 2018-04-16 16:58:34 +00:00
dfsan Add weak definitions of trace-cmp hooks to dfsan 2018-06-01 21:59:25 +00:00
esan [sanitizer] Replace InternalScopedBuffer with InternalMmapVector 2018-05-07 05:56:36 +00:00
fuzzer [libFuzzer] When printing NEW_FUNC, use 1-base indexing. 2018-06-07 21:15:24 +00:00
hwasan [HWASan] Report proper error on allocator failures instead of CHECK(0)-ing 2018-06-07 23:33:33 +00:00
interception [sanitizer] Trivial portion of the port to Myriad RTEMS 2018-05-18 00:43:54 +00:00
lsan [Sanitizers] Check alignment != 0 for aligned_alloc and posix_memalign 2018-06-08 20:40:35 +00:00
msan [MSan] Report proper error on allocator failures instead of CHECK(0)-ing 2018-06-08 23:31:42 +00:00
profile [CMake] Build shared version of runtimes for Fuchsia 2018-05-09 21:24:06 +00:00
safestack [safestack] Lazy initialization of interceptors 2018-05-26 01:18:32 +00:00
sanitizer_common [ASAN] Fix crash on i?86-linux (32-bit) against glibc 2.27 and later 2018-06-10 11:17:47 +00:00
scudo [scudo] Quarantine optimization 2018-05-16 18:12:31 +00:00
stats [sanitizer] Replace InternalScopedBuffer with InternalMmapVector 2018-05-07 05:56:36 +00:00
tsan Introduce CheckASLR() in sanitizers 2018-06-05 07:29:23 +00:00
ubsan [sanitizer] Trivial portion of the port to Myriad RTEMS 2018-05-18 00:43:54 +00:00
ubsan_minimal [CMake] Build shared version of runtimes for Fuchsia 2018-05-09 21:24:06 +00:00
xray [Xray] logging forgotten header 2018-06-08 08:42:37 +00:00
CMakeLists.txt [cmake] Add a separate CMake var to control profile runtime 2017-10-02 05:03:55 +00:00