From 99ec78c0feded25a2b01dd5ae822b37a70b63c17 Mon Sep 17 00:00:00 2001 From: Vitaly Buka Date: Wed, 23 Jun 2021 23:52:47 -0700 Subject: [PATCH] [scudo] Fix use of ScopedDisableMemoryTagChecks in test --- compiler-rt/lib/scudo/standalone/tests/wrappers_cpp_test.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/compiler-rt/lib/scudo/standalone/tests/wrappers_cpp_test.cpp b/compiler-rt/lib/scudo/standalone/tests/wrappers_cpp_test.cpp index 64a0917d4773..24fbf277e032 100644 --- a/compiler-rt/lib/scudo/standalone/tests/wrappers_cpp_test.cpp +++ b/compiler-rt/lib/scudo/standalone/tests/wrappers_cpp_test.cpp @@ -11,6 +11,7 @@ #include #include +#include #include #include #include @@ -111,7 +112,9 @@ TEST(ScudoWrappersCppTest, ThreadedNew) { #if !SCUDO_ANDROID // TODO: Investigate why libc sometimes crashes with tag missmatch in // __pthread_clockjoin_ex. - scudo::ScopedDisableMemoryTagChecks NoTags; + std::unique_ptr NoTags; + if (scudo::systemSupportsMemoryTagging()) + NoTags = std::make_unique(); #endif Ready = false; std::thread Threads[32];