[compiler-rt] [rtsan] Add I/O multiplexing interceptors (PR #115227)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 19 14:44:10 PST 2024
================
@@ -614,6 +615,104 @@ INTERCEPTOR(int, shutdown, int socket, int how) {
return REAL(shutdown)(socket, how);
}
+// I/O Multiplexing
+
+INTERCEPTOR(int, poll, struct pollfd *fds, nfds_t nfds, int timeout) {
+ __rtsan_notify_intercepted_call("poll");
+ return REAL(poll)(fds, nfds, timeout);
+}
+
+#if !SANITIZER_APPLE
+// FIXME: This should work on all unix systems, even Mac, but currently
+// it is showing some weird error while linking
+// error: declaration of 'select' has a different language linkage
----------------
davidtrevelyan wrote:
@cjappl There might be some clues comparing the declarations of `select` on Darwin and other unix OSes. Did you already take a look? I can investigate when I have some time (probably not for a couple of weeks, though, unfortunately)
https://github.com/llvm/llvm-project/pull/115227
More information about the llvm-commits
mailing list