[compiler-rt] [rtsan] Add more socket interceptors (PR #115020)

via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 5 09:00:28 PST 2024


================
@@ -648,14 +684,20 @@ void __rtsan::InitializeInterceptors() {
   INTERCEPT_FUNCTION(usleep);
   INTERCEPT_FUNCTION(nanosleep);
 
-  INTERCEPT_FUNCTION(socket);
+  INTERCEPT_FUNCTION(accept);
+  INTERCEPT_FUNCTION(bind);
+  INTERCEPT_FUNCTION(connect);
+  INTERCEPT_FUNCTION(getaddrinfo);
+  INTERCEPT_FUNCTION(getnameinfo);
+  INTERCEPT_FUNCTION(listen);
+  INTERCEPT_FUNCTION(recv);
+  INTERCEPT_FUNCTION(recvfrom);
----------------
davidtrevelyan wrote:

I'm surprised our tests were passing on Linux if this `INTERCEPT_FUNCTION(recvfrom);` wasn't present before - would we not be expecting a crash here from trying to invoke a nullptr function address in `ExpectNonrealtimeSurvival(Func)` in the recvfrom interceptor test?

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


More information about the llvm-commits mailing list