https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82379
--- Comment #4 from H.J. Lu <hjl.tools at gmail dot com> --- (In reply to Steven Noonan from comment #3) > Are you sure that patch is sufficient? __x86_64__ is defined on both the > normal x86_64 ABI and on the x32 ABI. The combination most often used to > identify x32 is 'defined(__x86_64__) && defined(__ILP32__)' > > I've currently got this patch applied locally which allows me to build > against the x32 ABI with -fsanitize=foo: > > diff --git a/libsanitizer/sanitizer_common/sanitizer_linux.cc > b/libsanitizer/sanitizer_common/sanitizer_linux.cc > index 5b6f18602e7..a11592614a4 100644 > --- a/libsanitizer/sanitizer_common/sanitizer_linux.cc > +++ b/libsanitizer/sanitizer_common/sanitizer_linux.cc > @@ -674,7 +674,7 @@ int internal_sigaction_syscall(int signum, const void > *act, void *oldact) { > return internal_sigaction_norestorer(signum, act, oldact); > __sanitizer_sigaction u_adjust; > internal_memcpy(&u_adjust, act, sizeof(u_adjust)); > -#if !SANITIZER_ANDROID || !SANITIZER_MIPS32 > +#if (!SANITIZER_ANDROID || !SANITIZER_MIPS32) && !defined(__ILP32__) > if (u_adjust.sa_restorer == nullptr) { > u_adjust.sa_restorer = internal_sigreturn; > } I don't believe this is correct. Please try my patch.