* [PATCH] libsanitizer: Fix asan SEGVs with gld on Solaris
@ 2023-01-17 8:57 Rainer Orth
2023-01-17 9:53 ` Richard Biener
0 siblings, 1 reply; 2+ messages in thread
From: Rainer Orth @ 2023-01-17 8:57 UTC (permalink / raw)
To: gcc-patches
[-- Attachment #1: Type: text/plain, Size: 733 bytes --]
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.
Ok to cherry-pick into libsanitizer?
Rainer
--
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University
2023-01-17 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
libsanitizer:
* sanitizer_common/sanitizer_platform_interceptors.h: Cherry-pick
llvm-project revision 951cf656b2faaf6fc0baa867293c0cb0ab131951.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: sol2-libsanitizer-no-intercept-tga.patch --]
[-- Type: text/x-patch, Size: 750 bytes --]
# HG changeset patch
# Parent 5c31a29beaaa8ed8a5a0dd7a6c11062a0a208c3a
libsanitizer: Don't intercept __tls_get_addr on Solaris
diff --git a/libsanitizer/sanitizer_common/sanitizer_platform_interceptors.h b/libsanitizer/sanitizer_common/sanitizer_platform_interceptors.h
--- 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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] libsanitizer: Fix asan SEGVs with gld on Solaris
2023-01-17 8:57 [PATCH] libsanitizer: Fix asan SEGVs with gld on Solaris Rainer Orth
@ 2023-01-17 9:53 ` Richard Biener
0 siblings, 0 replies; 2+ messages in thread
From: Richard Biener @ 2023-01-17 9:53 UTC (permalink / raw)
To: Rainer Orth; +Cc: gcc-patches
On Tue, Jan 17, 2023 at 9:58 AM Rainer Orth <ro@cebitec.uni-bielefeld.de> wrote:
>
> 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.
>
> Ok to cherry-pick into libsanitizer?
OK.
> Rainer
>
> --
> -----------------------------------------------------------------------------
> Rainer Orth, Center for Biotechnology, Bielefeld University
>
>
> 2023-01-17 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
>
> libsanitizer:
> * sanitizer_common/sanitizer_platform_interceptors.h: Cherry-pick
> llvm-project revision 951cf656b2faaf6fc0baa867293c0cb0ab131951.
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-01-17 9:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-17 8:57 [PATCH] libsanitizer: Fix asan SEGVs with gld on Solaris Rainer Orth
2023-01-17 9:53 ` Richard Biener
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).