[all-commits] [llvm/llvm-project] fcd6bd: [sanitizer_common] Fix internal_*stat on Linux/spa...
Rainer Orth via All-commits
all-commits at lists.llvm.org
Tue Jul 30 00:03:21 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: fcd6bd5587cc376cd8f43b60d1c7d61fdfe0f535
https://github.com/llvm/llvm-project/commit/fcd6bd5587cc376cd8f43b60d1c7d61fdfe0f535
Author: Rainer Orth <ro at gcc.gnu.org>
Date: 2024-07-30 (Tue, 30 Jul 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`.
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