From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1039) id 5802C3858D1E; Wed, 4 May 2022 23:07:44 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5802C3858D1E MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: H.J. Lu To: gcc-cvs@gcc.gnu.org Subject: [gcc r13-125] libsanitizer: cherry-pick commit f52e365092aa from upstream X-Act-Checkin: gcc X-Git-Author: H.J. Lu X-Git-Refname: refs/heads/master X-Git-Oldrev: a47ab705c2c9f07f08fde499d6be4682efe4b626 X-Git-Newrev: ae90c2d0f9bcc30af98c730f91544efa01cb897c Message-Id: <20220504230744.5802C3858D1E@sourceware.org> Date: Wed, 4 May 2022 23:07:44 +0000 (GMT) X-BeenThere: gcc-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 May 2022 23:07:44 -0000 https://gcc.gnu.org/g:ae90c2d0f9bcc30af98c730f91544efa01cb897c commit r13-125-gae90c2d0f9bcc30af98c730f91544efa01cb897c Author: H.J. Lu 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