diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2022-05-04 15:59:49 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2022-05-04 15:59:49 -0700 |
commit | ae90c2d0f9bcc30af98c730f91544efa01cb897c (patch) | |
tree | 99162107929edaa9be1b2214a51d573b5e848140 | |
parent | a47ab705c2c9f07f08fde499d6be4682efe4b626 (diff) | |
download | gcc-ae90c2d0f9bcc30af98c730f91544efa01cb897c.zip gcc-ae90c2d0f9bcc30af98c730f91544efa01cb897c.tar.gz gcc-ae90c2d0f9bcc30af98c730f91544efa01cb897c.tar.bz2 |
libsanitizer: cherry-pick commit f52e365092aa from upstream
cherry-pick:
f52e365092aa [sanitizer] Use newfstatat for x32
-rw-r--r-- | libsanitizer/sanitizer_common/sanitizer_linux.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libsanitizer/sanitizer_common/sanitizer_linux.cpp b/libsanitizer/sanitizer_common/sanitizer_linux.cpp index 8e144a4..e2c32d6 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 |