[compiler-rt] [rtsan] Add I/O multiplexing interceptors (PR #115227)

Chris Apple via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 6 14:29:56 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
----------------
cjappl wrote:

Drawing folks attention here, this is very strange and I haven't seen it for an interceptor before

https://github.com/llvm/llvm-project/pull/115227


More information about the llvm-commits mailing list