From: Rainer Orth Date: Tue, 17 Jan 2023 09:56:20 +0000 (+0100) Subject: libsanitizer: Fix asan SEGVs with gld on Solaris X-Git-Tag: basepoints/gcc-14~1985 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=85b45cccdf5f2442e791969abbffffbb2676591f;p=thirdparty%2Fgcc.git libsanitizer: Fix asan SEGVs with gld on Solaris When using GNU ld on Solaris, a large number of asan tests SEGV, while Solaris ld is fine. This happens inside the __tls_get_addr interceptor, which is highly glibc-specific. Therefore this patch disables that interceptor. Posted upstream at https://reviews.llvm.org/D141385. Tested on i386-pc-solaris2.11 and sparc-sun-solaris2.11. 2023-01-17 Rainer Orth libsanitizer: * sanitizer_common/sanitizer_platform_interceptors.h: Cherry-pick llvm-project revision 951cf656b2faaf6fc0baa867293c0cb0ab131951. --- diff --git a/libsanitizer/sanitizer_common/sanitizer_platform_interceptors.h b/libsanitizer/sanitizer_common/sanitizer_platform_interceptors.h index 6e3081ec1fcc..8307b1ec28bf 100644 --- a/libsanitizer/sanitizer_common/sanitizer_platform_interceptors.h +++ b/libsanitizer/sanitizer_common/sanitizer_platform_interceptors.h @@ -405,7 +405,7 @@ (SI_FREEBSD || SI_NETBSD || SI_GLIBC || SI_SOLARIS) #define SANITIZER_INTERCEPT_TLS_GET_ADDR \ - (SI_FREEBSD || SI_NETBSD || SI_LINUX_NOT_ANDROID || SI_SOLARIS) + (SI_FREEBSD || SI_NETBSD || SI_LINUX_NOT_ANDROID) #define SANITIZER_INTERCEPT_LISTXATTR SI_LINUX #define SANITIZER_INTERCEPT_GETXATTR SI_LINUX