[all-commits] [llvm/llvm-project] 34cf26: [sanitizer_common] Remove hacks for __builtin_retu...
Tobias Hieta via All-commits
all-commits at lists.llvm.org
Mon Aug 7 00:24:48 PDT 2023
Branch: refs/heads/release/17.x
Home: https://github.com/llvm/llvm-project
Commit: 34cf263e6149a0e13cbcba35d1017624e59ed996
https://github.com/llvm/llvm-project/commit/34cf263e6149a0e13cbcba35d1017624e59ed996
Author: Rainer Orth <ro at gcc.gnu.org>
Date: 2023-08-07 (Mon, 07 Aug 2023)
Changed paths:
M compiler-rt/lib/sanitizer_common/sanitizer_stacktrace_sparc.cpp
M compiler-rt/lib/sanitizer_common/sanitizer_unwind_linux_libcdep.cpp
Log Message:
-----------
[sanitizer_common] Remove hacks for __builtin_return_address abuse on SPARC
As detailed in Issue #57624, the introduction of
`__builtin_extract_return_address` to `GET_CALLER_PC` in
4248f32b9ebe87c7af8ee53911efd47c2652f488
<https://reviews.llvm.org/rG4248f32b9ebe87c7af8ee53911efd47c2652f488> broke
`TestCases/Misc/missing_return.cpp` on Solaris/SPARC. Unlike most other
targets, the builtin isn't a no-op on SPARC and thus has always been
necessary. Its lack had previously been worked around by calls to
`GetNextInstructionPc` in `sanitizer_stacktrace_sparc.cpp`
(`BufferedStackTrace::UnwindFast`) and `sanitizer_unwind_linux_libcdep.cpp`
(`BufferedStackTrace::UnwindSlow`). However, those calls are superfluous
now and actually harmful.
This patch removes those hacks, fixing the failure.
Tested on `sparcv9-sun-solaris2.11` and on `sparc-sun-solaris2.11` in the
GCC tree. On the latter, several more testcase failures had been caused by
this issue since ASan actually works with `gcc` on SPARC, unlike `clang`.
Differential Revision: https://reviews.llvm.org/D156504
(cherry picked from commit 679c076ae446af81eba81ce9b94203a273d4b88a)
More information about the All-commits
mailing list