[compiler-rt] [rtsan] Add fork/execve interceptors (PR #117198)
Chris Apple via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 21 09:47:57 PST 2024
================
@@ -751,6 +754,22 @@ INTERCEPTOR(int, mkfifo, const char *pathname, mode_t mode) {
return REAL(mkfifo)(pathname, mode);
}
+INTERCEPTOR(pid_t, fork, void) {
+ __rtsan_notify_intercepted_call("fork");
+ return REAL(fork)();
+}
+
+INTERCEPTOR(int, execve, const char *filename, char *const argv[],
+ char *const envp[]) {
+ __rtsan_notify_intercepted_call("execve");
+ return REAL(execve)(filename, argv, envp);
+}
+
+// TODO: the `wait` family of functions is an oddity. In testing, if you
----------------
cjappl wrote:
Drawing folks attention here
https://github.com/llvm/llvm-project/pull/117198
More information about the llvm-commits
mailing list