Skip to content

Commit 934140a

Browse files
authored
[rtsan] Remove mkfifoat interceptor (#116997)
This partially reverts #116915 [fce917d](fce917d) mkfifoat was improperly guarded against in MacOS systems
1 parent b8e1d4d commit 934140a

File tree

2 files changed

+0
-26
lines changed

2 files changed

+0
-26
lines changed

compiler-rt/lib/rtsan/rtsan_interceptors_posix.cpp

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -746,16 +746,6 @@ INTERCEPTOR(int, mkfifo, const char *pathname, mode_t mode) {
746746
return REAL(mkfifo)(pathname, mode);
747747
}
748748

749-
// see comment above about -Wunguarded-availability-new
750-
// and why we disable it here
751-
#pragma clang diagnostic push
752-
#pragma clang diagnostic ignored "-Wunguarded-availability-new"
753-
INTERCEPTOR(int, mkfifoat, int dirfd, const char *pathname, mode_t mode) {
754-
__rtsan_notify_intercepted_call("mkfifoat");
755-
return REAL(mkfifoat)(dirfd, pathname, mode);
756-
}
757-
#pragma clang diagnostic pop
758-
759749
// Preinit
760750
void __rtsan::InitializeInterceptors() {
761751
INTERCEPT_FUNCTION(calloc);
@@ -859,7 +849,6 @@ void __rtsan::InitializeInterceptors() {
859849

860850
INTERCEPT_FUNCTION(pipe);
861851
INTERCEPT_FUNCTION(mkfifo);
862-
INTERCEPT_FUNCTION(mkfifoat);
863852
}
864853

865854
#endif // SANITIZER_POSIX

compiler-rt/lib/rtsan/tests/rtsan_test_interceptors_posix.cpp

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -971,21 +971,6 @@ TEST(TestRtsanInterceptors, MkfifoDiesWhenRealtime) {
971971
ExpectNonRealtimeSurvival(Func);
972972
}
973973

974-
#if __has_builtin(__builtin_available) && SANITIZER_APPLE
975-
#define MKFIFOAT_AVAILABLE() (__builtin_available(macOS 10.13, *))
976-
#else
977-
// We are going to assume this is true until we hit systems where it isn't
978-
#define MKFIFOAT_AVAILABLE() (true)
979-
#endif
980-
981-
TEST(TestRtsanInterceptors, MkfifoatDiesWhenRealtime) {
982-
if (MKFIFOAT_AVAILABLE()) {
983-
auto Func = []() { mkfifoat(0, "/tmp/rtsan_test_fifo", 0); };
984-
ExpectRealtimeDeath(Func, "mkfifoat");
985-
ExpectNonRealtimeSurvival(Func);
986-
}
987-
}
988-
989974
TEST(TestRtsanInterceptors, PipeDiesWhenRealtime) {
990975
int fds[2];
991976
auto Func = [&fds]() { pipe(fds); };

0 commit comments

Comments
 (0)