[all-commits] [llvm/llvm-project] 587eae: [sanitizer_common] Handle ptrace on Linux/sparc64 ...
Rainer Orth via All-commits
all-commits at lists.llvm.org
Mon Sep 30 04:41:41 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 587eaefe876f8fd2cd8b9b0862d81f35b7f9ebce
https://github.com/llvm/llvm-project/commit/587eaefe876f8fd2cd8b9b0862d81f35b7f9ebce
Author: Rainer Orth <ro at gcc.gnu.org>
Date: 2024-09-30 (Mon, 30 Sep 2024)
Changed paths:
M compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc
M compiler-rt/lib/sanitizer_common/sanitizer_common_syscalls.inc
M compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h
M compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp
M compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h
M compiler-rt/test/asan/TestCases/Linux/ptrace.cpp
Log Message:
-----------
[sanitizer_common] Handle ptrace on Linux/sparc64 (#109310)
When ASan testing is enabled on SPARC as per PR #107405, the
```
AddressSanitizer-sparc-linux :: TestCases/Linux/ptrace.cpp
```
`FAIL`s on Linux/sparc64. This happens because the `ptrace` interceptor
has no support for that target at all.
This patch adds the missing parts and accounts for a couple of issues
specific to this target:
- In some cases, SPARC just needs to be included in the list of
supported targets.
- Besides, the types used by the `PTRACE_GETREGS` and `PTRACE_GETFPREGS`
requests need to be filled in.
- `ptrace` has a weird quirk on this target: for a couple of requests,
the meaning of the `data` and `addr` args is reversed. All of the
`Linux/ptrace.cpp` test and the interceptor, pre-syscall and
post-syscall hooks need to account for that swap in their checks.
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