[compiler-rt] [compiler-rt][rtsan] copy_file_range interception for Linux. (PR #129026)
    via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Thu Feb 27 02:57:56 PST 2025
    
    
  
================
@@ -312,6 +312,18 @@ INTERCEPTOR(int, ftruncate64, int fd, off64_t length) {
 #define RTSAN_MAYBE_INTERCEPT_FTRUNCATE64
 #endif
 
+#if SANITIZER_LINUX
+INTERCEPTOR(ssize_t, copy_file_range, int fdin, off_t *off_int, int fdout,
+            off_t *off_out, size_t len, unsigned int flags) {
+  __rtsan_notify_intercepted_call("copy_file_range");
+  return REAL(copy_file_range)(fdin, off_int, fdout, off_out, len, flags);
+}
+#define RTSAN_MAYBE_INTERCEPT_COPY_FILE_RANGE                                  \
----------------
davidtrevelyan wrote:
Do we need the `MAYBE_INTERCEPT` indirection here? 
https://github.com/llvm/llvm-project/pull/129026
    
    
More information about the llvm-commits
mailing list