public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r13-125] libsanitizer: cherry-pick commit f52e365092aa from upstream
@ 2022-05-04 23:07 H.J. Lu
  0 siblings, 0 replies; only message in thread
From: H.J. Lu @ 2022-05-04 23:07 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:ae90c2d0f9bcc30af98c730f91544efa01cb897c

commit r13-125-gae90c2d0f9bcc30af98c730f91544efa01cb897c
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Wed May 4 15:59:49 2022 -0700

    libsanitizer: cherry-pick commit f52e365092aa from upstream
    
    cherry-pick:
    
    f52e365092aa [sanitizer] Use newfstatat for x32

Diff:
---
 libsanitizer/sanitizer_common/sanitizer_linux.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libsanitizer/sanitizer_common/sanitizer_linux.cpp b/libsanitizer/sanitizer_common/sanitizer_linux.cpp
index 8e144a4e9a0..e2c32d679ad 100644
--- a/libsanitizer/sanitizer_common/sanitizer_linux.cpp
+++ b/libsanitizer/sanitizer_common/sanitizer_linux.cpp
@@ -343,7 +343,7 @@ uptr internal_stat(const char *path, void *buf) {
 #if SANITIZER_FREEBSD
   return internal_syscall(SYSCALL(fstatat), AT_FDCWD, (uptr)path, (uptr)buf, 0);
 #    elif SANITIZER_LINUX
-#      if SANITIZER_WORDSIZE == 64
+#      if SANITIZER_WORDSIZE == 64 || SANITIZER_X32
   return internal_syscall(SYSCALL(newfstatat), AT_FDCWD, (uptr)path, (uptr)buf,
                           0);
 #      else
@@ -366,7 +366,7 @@ uptr internal_lstat(const char *path, void *buf) {
   return internal_syscall(SYSCALL(fstatat), AT_FDCWD, (uptr)path, (uptr)buf,
                           AT_SYMLINK_NOFOLLOW);
 #    elif SANITIZER_LINUX
-#      if defined(_LP64)
+#      if defined(_LP64) || SANITIZER_X32
   return internal_syscall(SYSCALL(newfstatat), AT_FDCWD, (uptr)path, (uptr)buf,
                           AT_SYMLINK_NOFOLLOW);
 #      else


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-05-04 23:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-04 23:07 [gcc r13-125] libsanitizer: cherry-pick commit f52e365092aa from upstream H.J. Lu

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).