[compiler-rt] [sanitizer_common] Handle ptrace on Linux/sparc64 (PR #109310)
Rainer Orth via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 25 09:10:23 PDT 2024
================
@@ -3430,23 +3430,34 @@ INTERCEPTOR(uptr, ptrace, int request, int pid, void *addr, void *data) {
COMMON_INTERCEPTOR_ENTER(ctx, ptrace, request, pid, addr, data);
__sanitizer_iovec local_iovec;
- if (data) {
+ void *data_arg = data;
+# if defined(__sparc__)
+ // The meanings of addr and data are reversed for a few requests on
+ // Linux/sparc64.
+ if (request == ptrace_getregs || request == ptrace_getfpregs ||
----------------
rorth wrote:
Done: it's on `ptrace(2)`.
https://github.com/llvm/llvm-project/pull/109310
More information about the llvm-commits
mailing list