Don't rely on malloc hooks in asan/msan
As already observed in @aos//aos:realtime_test, our die_on_malloc hooks
don't work under asan/msan, so disable the tests in those cases.
Change-Id: Ie77238257a936eb4e6b5b0183e987dc85758c29f
Signed-off-by: James Kuszmaul <james.kuszmaul@bluerivertech.com>
diff --git a/aos/containers/inlined_vector_test.cc b/aos/containers/inlined_vector_test.cc
index 23266e9..7368844 100644
--- a/aos/containers/inlined_vector_test.cc
+++ b/aos/containers/inlined_vector_test.cc
@@ -27,12 +27,15 @@
// And double-check that we can actually construct a new object at realtime.
InlinedVector<int, 5> b;
}
+// Malloc hooks don't work with asan/msan.
+#if !__has_feature(address_sanitizer) && !__has_feature(memory_sanitizer)
EXPECT_DEATH(
{
aos::ScopedRealtime realtime;
a.push_back(4);
},
"Malloced");
+#endif
}
// Tests that we can create/define a vector with zero statically allocated