Random HWASan cleanups.
Makes CtsBionicTestCases pass under HWASan.
Bug: 193568145
Test: CtsBionicTestCases
Change-Id: I38ee8a8508827c0ffee61ce33bb8c6a3f40388c9
diff --git a/tests/malloc_test.cpp b/tests/malloc_test.cpp
index eae44ce..3f22007 100644
--- a/tests/malloc_test.cpp
+++ b/tests/malloc_test.cpp
@@ -700,7 +700,10 @@
FILE* fp = fdopen(tf.fd, "w+");
tf.release();
ASSERT_TRUE(fp != nullptr);
- ASSERT_EQ(0, malloc_info(0, fp));
+ if (malloc_info(0, fp) != 0) {
+ *allocator_scudo = false;
+ return;
+ }
ASSERT_EQ(0, fclose(fp));
std::string contents;