Skip to content

[rtsan] Remove mkfifoat interceptor #116997

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
Nov 20, 2024
Merged
Show file tree
Hide file tree
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
11 changes: 0 additions & 11 deletions compiler-rt/lib/rtsan/rtsan_interceptors_posix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -746,16 +746,6 @@ INTERCEPTOR(int, mkfifo, const char *pathname, mode_t mode) {
return REAL(mkfifo)(pathname, mode);
}

// see comment above about -Wunguarded-availability-new
// and why we disable it here
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunguarded-availability-new"
INTERCEPTOR(int, mkfifoat, int dirfd, const char *pathname, mode_t mode) {
__rtsan_notify_intercepted_call("mkfifoat");
return REAL(mkfifoat)(dirfd, pathname, mode);
}
#pragma clang diagnostic pop

// Preinit
void __rtsan::InitializeInterceptors() {
INTERCEPT_FUNCTION(calloc);
Expand Down Expand Up @@ -859,7 +849,6 @@ void __rtsan::InitializeInterceptors() {

INTERCEPT_FUNCTION(pipe);
INTERCEPT_FUNCTION(mkfifo);
INTERCEPT_FUNCTION(mkfifoat);
}

#endif // SANITIZER_POSIX
15 changes: 0 additions & 15 deletions compiler-rt/lib/rtsan/tests/rtsan_test_interceptors_posix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -971,21 +971,6 @@ TEST(TestRtsanInterceptors, MkfifoDiesWhenRealtime) {
ExpectNonRealtimeSurvival(Func);
}

#if __has_builtin(__builtin_available) && SANITIZER_APPLE
#define MKFIFOAT_AVAILABLE() (__builtin_available(macOS 10.13, *))
#else
// We are going to assume this is true until we hit systems where it isn't
#define MKFIFOAT_AVAILABLE() (true)
#endif

TEST(TestRtsanInterceptors, MkfifoatDiesWhenRealtime) {
if (MKFIFOAT_AVAILABLE()) {
auto Func = []() { mkfifoat(0, "/tmp/rtsan_test_fifo", 0); };
ExpectRealtimeDeath(Func, "mkfifoat");
ExpectNonRealtimeSurvival(Func);
}
}

TEST(TestRtsanInterceptors, PipeDiesWhenRealtime) {
int fds[2];
auto Func = [&fds]() { pipe(fds); };
Expand Down
Loading