[all-commits] [llvm/llvm-project] 67ced6: [Sanitizers] Cleanup handling of stat64/statfs64
Mariusz Borsa via All-commits
all-commits at lists.llvm.org
Tue Jun 28 15:02:37 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 67ced6af3b6e2f3a3b8c82907e0283326c9ee7be
https://github.com/llvm/llvm-project/commit/67ced6af3b6e2f3a3b8c82907e0283326c9ee7be
Author: Mariusz Borsa <m_borsa at apple.com>
Date: 2022-06-28 (Tue, 28 Jun 2022)
Changed paths:
M compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h
M compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_linux.cpp
M compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp
M compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h
Log Message:
-----------
[Sanitizers] Cleanup handling of stat64/statfs64
This is a follow up to <LLVM reviews>/D127343, which was reverted due to test failures.
There are differences in handling of stat64/statfs64 calls by sanitizers between Linux and macOS. Versions of macOS starting with 10.6 drop the stat64/statfs64 APIs completely, relying on the linker to redirect stat/statfs to the appropriate 64 bit versions. Emitting variables needed by sanitizers is thus controlled by convoluted sets of conditions, involving Linux, IOS, macOS and Android, sprinkled around files.
This change clarifies it a bit, allowing to specify presence/absence of stat64/statfs64 for each platform, in a single location.
Please note that I wasn't able to test this change on platforms other than macOS and Linux Fedora 34. The previous attempt has caused test failures but couldn't figure out the context. I have a vague suspicion that they were Android and perhaps Fuchsia builds - and some build involving ppc64le, I don't have hardware handy to attempt a test there. Tried to tighten the conditions this time to clearly separate macOS from Linux, so Linux builds should behave same (sanitizerwise) as before the change. Will add people who reported the tests failing before as reviewers, so they can provide context should the change cause the test failures again.
Differential Revision: https://reviews.llvm.org/D128476
More information about the All-commits
mailing list