From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1147) id D0B0B3858D28; Tue, 17 Jan 2023 09:56:54 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D0B0B3858D28 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1673949414; bh=9ASeGfg+MVTogf/9RepJvc4vwLJ6NzVmcuc71BNyHng=; h=From:To:Subject:Date:From; b=JJ4imMPCSywjh/WzBFDcqSpBr2ZqBk3WMoY8hGPzpxJkzku0MSTisG29sq1aaxp1B aFJqwK6cILs8mKWBaT22WmEEpaGSHsrzuwkMSk+NzCV80cnKh245A65L4Y09bMZTNU aV6Z4AgoM/YpneDHKBT5up7DxbL0HaZXg0wywFDo= MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Rainer Orth To: gcc-cvs@gcc.gnu.org Subject: [gcc r13-5222] libsanitizer: Fix asan SEGVs with gld on Solaris X-Act-Checkin: gcc X-Git-Author: Rainer Orth X-Git-Refname: refs/heads/master X-Git-Oldrev: f457a62e63a86d5e5342eda16538a26355199856 X-Git-Newrev: 85b45cccdf5f2442e791969abbffffbb2676591f Message-Id: <20230117095654.D0B0B3858D28@sourceware.org> Date: Tue, 17 Jan 2023 09:56:54 +0000 (GMT) List-Id: https://gcc.gnu.org/g:85b45cccdf5f2442e791969abbffffbb2676591f commit r13-5222-g85b45cccdf5f2442e791969abbffffbb2676591f Author: Rainer Orth Date: Tue Jan 17 10:56:20 2023 +0100 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: --- libsanitizer/sanitizer_common/sanitizer_platform_interceptors.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libsanitizer/sanitizer_common/sanitizer_platform_interceptors.h b/libsanitizer/sanitizer_common/sanitizer_platform_interceptors.h index 6e3081ec1fc..8307b1ec28b 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