Skip to content

[compiler-rt][rtsan] Fix recvmmsg rtsan interceptor for glibc < 2.21 #123664

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 21, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions compiler-rt/lib/rtsan/rtsan_interceptors_posix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -927,8 +927,13 @@ INTERCEPTOR(ssize_t, recvmsg, int socket, struct msghdr *message, int flags) {
}

#if SANITIZER_INTERCEPT_RECVMMSG
#if defined(__GLIBC_MINOR__) && __GLIBC_MINOR__ < 21
INTERCEPTOR(int, recvmmsg, int socket, struct mmsghdr *message,
unsigned int len, int flags, const struct timespec *timeout) {
#else
INTERCEPTOR(int, recvmmsg, int socket, struct mmsghdr *message,
unsigned int len, int flags, struct timespec *timeout) {
#endif
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would have a comment here saying what this is finishing

#endif defined(GLIBC_MINOR) && GLIBC_MINOR < 21

__rtsan_notify_intercepted_call("recvmmsg");
return REAL(recvmmsg)(socket, message, len, flags, timeout);
}
Expand Down
Loading