[compiler-rt] [sanitizer_common] Handle ptrace on Linux/sparc64 (PR #109310)
Vitaly Buka via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 23 22:01:56 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 ||
----------------
vitalybuka wrote:
That's really weird.
Can you add a comment with proof-link here for future readers?
https://github.com/llvm/llvm-project/pull/109310
More information about the llvm-commits
mailing list