Skip to content

Commit a31e253

Browse files
authored
[compiler-rt][rtsan] Fix recvmmsg rtsan interceptor for glibc < 2.21 (#123664)
linux/glibc prior to 2.21 had a different signature for recvmmsg. Fix #123484
1 parent 4564ac9 commit a31e253

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

compiler-rt/lib/rtsan/rtsan_interceptors_posix.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -927,8 +927,13 @@ INTERCEPTOR(ssize_t, recvmsg, int socket, struct msghdr *message, int flags) {
927927
}
928928

929929
#if SANITIZER_INTERCEPT_RECVMMSG
930+
#if defined(__GLIBC_MINOR__) && __GLIBC_MINOR__ < 21
931+
INTERCEPTOR(int, recvmmsg, int socket, struct mmsghdr *message,
932+
unsigned int len, int flags, const struct timespec *timeout) {
933+
#else
930934
INTERCEPTOR(int, recvmmsg, int socket, struct mmsghdr *message,
931935
unsigned int len, int flags, struct timespec *timeout) {
936+
#endif
932937
__rtsan_notify_intercepted_call("recvmmsg");
933938
return REAL(recvmmsg)(socket, message, len, flags, timeout);
934939
}

0 commit comments

Comments
 (0)