[compiler-rt] [scudo] Only init RingBuffer when needed. (PR #85994)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 26 11:49:40 PDT 2024
================
@@ -867,29 +867,83 @@ SCUDO_TYPED_TEST(ScudoCombinedTest, ReallocateInPlaceStress) {
}
}
+SCUDO_TYPED_TEST(ScudoCombinedTest, RingBufferDefaultDisabled) {
+ // The RingBuffer is not initialized until tracking is enabled for the
+ // first time.
+ auto *Allocator = this->Allocator.get();
+ ASSERT_EQ(0u, Allocator->getRingBufferSize());
+ ASSERT_EQ(nullptr, Allocator->getRingBufferAddress());
----------------
ChiaHungDuan wrote:
I think we may want to use EXPECT_* instead of ASSERT_* here and below given that it's not a fatal failure. (I know you're following the styles, or we can fix them in another CL)
https://github.com/llvm/llvm-project/pull/85994
More information about the llvm-commits
mailing list