public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: H.J. Lu <hjl@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc r13-145] libsanitizer: cherry-pick commit b226894d475b from upstream Date: Thu, 5 May 2022 21:02:26 +0000 (GMT) [thread overview] Message-ID: <20220505210226.5E5B8385737E@sourceware.org> (raw) https://gcc.gnu.org/g:a48be2e513d9ddb2fa8800a158f18502a0923aec commit r13-145-ga48be2e513d9ddb2fa8800a158f18502a0923aec Author: H.J. Lu <hjl.tools@gmail.com> Date: Thu May 5 13:59:16 2022 -0700 libsanitizer: cherry-pick commit b226894d475b from upstream cherry-pick: b226894d475b [sanitizer] [sanitizer] Correct GetTls for x32 Diff: --- libsanitizer/sanitizer_common/sanitizer_linux_libcdep.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libsanitizer/sanitizer_common/sanitizer_linux_libcdep.cpp b/libsanitizer/sanitizer_common/sanitizer_linux_libcdep.cpp index d966d857a76..620267cdd02 100644 --- a/libsanitizer/sanitizer_common/sanitizer_linux_libcdep.cpp +++ b/libsanitizer/sanitizer_common/sanitizer_linux_libcdep.cpp @@ -462,7 +462,11 @@ static void GetTls(uptr *addr, uptr *size) { #elif SANITIZER_GLIBC && defined(__x86_64__) // For aarch64 and x86-64, use an O(1) approach which requires relatively // precise ThreadDescriptorSize. g_tls_size was initialized in InitTlsSize. +# if SANITIZER_X32 + asm("mov %%fs:8,%0" : "=r"(*addr)); +# else asm("mov %%fs:16,%0" : "=r"(*addr)); +# endif *size = g_tls_size; *addr -= *size; *addr += ThreadDescriptorSize();
reply other threads:[~2022-05-05 21:02 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20220505210226.5E5B8385737E@sourceware.org \ --to=hjl@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).