[all-commits] [llvm/llvm-project] 282f10: [sanitizer_common] Fix internal_*stat on Linux/spa...
Rainer Orth via All-commits
all-commits at lists.llvm.org
Sat Aug 10 02:50:40 PDT 2024
Branch: refs/heads/release/19.x
Home: https://github.com/llvm/llvm-project
Commit: 282f103026c78e1881843aee61ac412c153f6df9
https://github.com/llvm/llvm-project/commit/282f103026c78e1881843aee61ac412c153f6df9
Author: Rainer Orth <ro at gcc.gnu.org>
Date: 2024-08-10 (Sat, 10 Aug 2024)
Changed paths:
M compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp
Log Message:
-----------
[sanitizer_common] Fix internal_*stat on Linux/sparc64 (#101012)
```
SanitizerCommon-Unit :: ./Sanitizer-sparcv9-Test/SanitizerCommon/FileOps
```
`FAIL`s on 64-bit Linux/sparc64:
```
projects/compiler-rt/lib/sanitizer_common/tests/./Sanitizer-sparcv9-Test --gtest_filter=SanitizerCommon.FileOps
--
compiler-rt/lib/sanitizer_common/tests/sanitizer_libc_test.cpp:144: Failure
Expected equality of these values:
len1 + len2
Which is: 10
fsize
Which is: 1721875535
```
The issue is similar to the mips64 case: the Linux/sparc64 `*stat`
syscalls take a `struct kernel_stat64 *` arg. Also the syscalls actually
used differ.
This patch handles this, adopting the mips64 code to avoid too much
duplication.
Tested on `sparc64-unknown-linux-gnu` and `x86_64-pc-linux-gnu`.
(cherry picked from commit fcd6bd5587cc376cd8f43b60d1c7d61fdfe0f535)
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list