[compiler-rt] [compiler-rt][rtsan] adding setlinebuf/setbuffer interception. (PR #122018)
Florian Mayer via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 8 02:19:44 PST 2025
================
@@ -429,6 +429,28 @@ TEST_F(RtsanFileTest, SetvbufDieWhenRealtime) {
ExpectRealtimeDeath(Func, "setvbuf");
ExpectNonRealtimeSurvival(Func);
}
+
+TEST_F(RtsanFileTest, SetlinebufDieWhenRealtime) {
+ FILE *f = fopen(GetTemporaryFilePath(), "w");
+ EXPECT_THAT(f, Ne(nullptr));
+
+ auto Func = [&f]() { setlinebuf(f); };
----------------
fmayer wrote:
nit: why by ref?
https://github.com/llvm/llvm-project/pull/122018
More information about the llvm-commits
mailing list