Skip to content

Commit f798439

Browse files
[rtsan][compiler-rt] Fix ioctl test causing segfault on exit
1 parent 46526f8 commit f798439

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -752,8 +752,8 @@ TEST_F(RtsanOpenedFileTest, RewindDieWhenRealtime) {
752752
}
753753
#endif
754754

755-
TEST(TestRtsanInterceptors, IoctlDiesWhenRealtime) {
756-
auto Func = []() { ioctl(0, FIONREAD); };
755+
TEST_F(RtsanOpenedFileTest, IoctlDiesWhenRealtime) {
756+
auto Func = [this]() { ioctl(GetOpenFd(), FIONREAD); };
757757
ExpectRealtimeDeath(Func, "ioctl");
758758
ExpectNonRealtimeSurvival(Func);
759759
}

0 commit comments

Comments
 (0)