summaryrefslogtreecommitdiff
path: root/tests/malloc_test.cpp
diff options
context:
space:
mode:
authorChris Gross <chrisgross@google.com>2021-01-26 11:21:18 -0800
committerChris Gross <chrisgross@google.com>2021-01-26 11:21:18 -0800
commit3cfe8f2ca3589184c6329a6fa4fadf7a5ebaa0d4 (patch)
tree9bcf68ef6d21865a206a4cc602ca300b32c4721d /tests/malloc_test.cpp
parent88ce4f4fc35e7b2af5dcd2be726328105f219ed5 (diff)
parente3471386f03ff7dd1f2fb8b438fc06bba91cfa57 (diff)
Merge SP1A.210122.003
Change-Id: I38a0c2cf0aed3762aafe4b1fa8a69dd03106fa39
Diffstat (limited to 'tests/malloc_test.cpp')
-rw-r--r--tests/malloc_test.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/tests/malloc_test.cpp b/tests/malloc_test.cpp
index ddd3416be..b35bba983 100644
--- a/tests/malloc_test.cpp
+++ b/tests/malloc_test.cpp
@@ -47,7 +47,6 @@
#include "platform/bionic/malloc.h"
#include "platform/bionic/mte.h"
-#include "platform/bionic/mte_kernel.h"
#include "platform/bionic/reserved_signals.h"
#include "private/bionic_config.h"
@@ -1257,13 +1256,12 @@ TEST(android_mallopt, set_allocation_limit_multiple_threads) {
#endif
}
-TEST(android_mallopt, disable_memory_mitigations) {
+TEST(malloc, disable_memory_mitigations) {
#if defined(__BIONIC__)
if (!mte_supported()) {
GTEST_SKIP() << "This function can only be tested with MTE";
}
-#ifdef ANDROID_EXPERIMENTAL_MTE
sem_t sem;
ASSERT_EQ(0, sem_init(&sem, 0, 0));
@@ -1277,7 +1275,7 @@ TEST(android_mallopt, disable_memory_mitigations) {
},
&sem));
- ASSERT_TRUE(android_mallopt(M_DISABLE_MEMORY_MITIGATIONS, nullptr, 0));
+ ASSERT_EQ(1, mallopt(M_BIONIC_DISABLE_MEMORY_MITIGATIONS, 0));
ASSERT_EQ(0, sem_post(&sem));
int my_tagged_addr_ctrl = prctl(PR_GET_TAGGED_ADDR_CTRL, 0, 0, 0, 0);
@@ -1287,7 +1285,6 @@ TEST(android_mallopt, disable_memory_mitigations) {
ASSERT_EQ(0, pthread_join(thread, &retval));
int thread_tagged_addr_ctrl = reinterpret_cast<uintptr_t>(retval);
ASSERT_EQ(my_tagged_addr_ctrl, thread_tagged_addr_ctrl);
-#endif
#else
GTEST_SKIP() << "bionic extension";
#endif