Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[compiler-rt][rtsan] Fix process_vm_readv/process_vm_writev signatures. #123914

Merged
merged 1 commit into from
Jan 22, 2025

Conversation

devnexen
Copy link
Member

missing pid_t first argument. Fix #123839

@llvmbot
Copy link
Member

llvmbot commented Jan 22, 2025

@llvm/pr-subscribers-compiler-rt-sanitizer

Author: David CARLIER (devnexen)

Changes

missing pid_t first argument. Fix #123839


Full diff: /~https://github.com/llvm/llvm-project/pull/123914.diff

1 Files Affected:

  • (modified) compiler-rt/lib/rtsan/rtsan_interceptors_posix.cpp (+8-6)
diff --git a/compiler-rt/lib/rtsan/rtsan_interceptors_posix.cpp b/compiler-rt/lib/rtsan/rtsan_interceptors_posix.cpp
index 008cc676a6ae55..48ba979ca93c05 100644
--- a/compiler-rt/lib/rtsan/rtsan_interceptors_posix.cpp
+++ b/compiler-rt/lib/rtsan/rtsan_interceptors_posix.cpp
@@ -1107,18 +1107,20 @@ INTERCEPTOR(int, execve, const char *filename, char *const argv[],
 }
 
 #if SANITIZER_INTERCEPT_PROCESS_VM_READV
-INTERCEPTOR(ssize_t, process_vm_readv, const struct iovec *local_iov,
+INTERCEPTOR(ssize_t, process_vm_readv, pid_t pid, const struct iovec *local_iov,
             unsigned long liovcnt, const struct iovec *remote_iov,
             unsigned long riovcnt, unsigned long flags) {
   __rtsan_notify_intercepted_call("process_vm_readv");
-  return REAL(process_vm_readv)(local_iov, liovcnt, remote_iov, riovcnt, flags);
+  return REAL(process_vm_readv)(pid, local_iov, liovcnt, remote_iov, riovcnt,
+                                flags);
 }
 
-INTERCEPTOR(ssize_t, process_vm_writev, const struct iovec *local_iov,
-            unsigned long liovcnt, const struct iovec *remote_iov,
-            unsigned long riovcnt, unsigned long flags) {
+INTERCEPTOR(ssize_t, process_vm_writev, pid_t pid,
+            const struct iovec *local_iov, unsigned long liovcnt,
+            const struct iovec *remote_iov, unsigned long riovcnt,
+            unsigned long flags) {
   __rtsan_notify_intercepted_call("process_vm_writev");
-  return REAL(process_vm_writev)(local_iov, liovcnt, remote_iov, riovcnt,
+  return REAL(process_vm_writev)(pid, local_iov, liovcnt, remote_iov, riovcnt,
                                  flags);
 }
 #define RTSAN_MAYBE_INTERCEPT_PROCESS_VM_READV                                 \

@kongy kongy merged commit 6123a81 into llvm:main Jan 22, 2025
8 of 9 checks passed
@devnexen devnexen deleted the gh123839_fix branch January 22, 2025 10:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants