summaryrefslogtreecommitdiff
path: root/tests/stack_protector_test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/stack_protector_test.cpp')
-rw-r--r--tests/stack_protector_test.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/stack_protector_test.cpp b/tests/stack_protector_test.cpp
index 34e3c1153..7a85cc34b 100644
--- a/tests/stack_protector_test.cpp
+++ b/tests/stack_protector_test.cpp
@@ -104,6 +104,11 @@ class stack_protector_DeathTest : public BionicDeathTest {};
TEST_F(stack_protector_DeathTest, modify_stack_protector) {
// In another file to prevent inlining, which removes stack protection.
extern void modify_stack_protector_test();
+#if __has_feature(hwaddress_sanitizer)
+ ASSERT_EXIT(modify_stack_protector_test(),
+ testing::KilledBySignal(SIGABRT), "tag-mismatch");
+#else
ASSERT_EXIT(modify_stack_protector_test(),
testing::KilledBySignal(SIGABRT), "stack corruption detected");
+#endif
}