diff options
author | Christopher Ferris <cferris@google.com> | 2023-07-17 19:33:16 -0700 |
---|---|---|
committer | Christopher Ferris <cferris@google.com> | 2023-07-18 13:52:16 -0700 |
commit | 902c41fc800290076a107fc8c1e6d8da688bc1ae (patch) | |
tree | 864beee164b005a1abc68259b30416f27366dd27 | |
parent | 729ffb5cdf3ee09e8e89cdd122084a9563ee0717 (diff) | |
download | llvm-902c41fc800290076a107fc8c1e6d8da688bc1ae.zip llvm-902c41fc800290076a107fc8c1e6d8da688bc1ae.tar.gz llvm-902c41fc800290076a107fc8c1e6d8da688bc1ae.tar.bz2 |
[scudo] Fix memtag tests.
A few memtag tests were using EXPECT_DEBUG_DEATH which executes the
statement unless NDEBUG is set. This meant the statement would
cause an abort, but the EXPECT_DEATH part was not done. Change these
to simply EXPECT_DEATH, these tests already verify that SCUDO_DEBUG
is set before checking for DEATH.
Reviewed By: Chia-hungDuan
Differential Revision: https://reviews.llvm.org/D155538
-rw-r--r-- | compiler-rt/lib/scudo/standalone/tests/memtag_test.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/compiler-rt/lib/scudo/standalone/tests/memtag_test.cpp b/compiler-rt/lib/scudo/standalone/tests/memtag_test.cpp index d4c39aa..31b6514 100644 --- a/compiler-rt/lib/scudo/standalone/tests/memtag_test.cpp +++ b/compiler-rt/lib/scudo/standalone/tests/memtag_test.cpp @@ -88,8 +88,8 @@ TEST_F(MemtagDeathTest, AddFixedTag) { for (uptr Tag = 0; Tag < 0x10; ++Tag) EXPECT_EQ(Tag, extractTag(addFixedTag(Addr, Tag))); if (SCUDO_DEBUG) { - EXPECT_DEBUG_DEATH(addFixedTag(Addr, 16), ""); - EXPECT_DEBUG_DEATH(addFixedTag(~Addr, 0), ""); + EXPECT_DEATH(addFixedTag(Addr, 16), ""); + EXPECT_DEATH(addFixedTag(~Addr, 0), ""); } } @@ -131,8 +131,8 @@ TEST_F(MemtagDeathTest, SKIP_NO_DEBUG(LoadStoreTagUnaligned)) { for (uptr P = Addr; P < Addr + 4 * archMemoryTagGranuleSize(); ++P) { if (P % archMemoryTagGranuleSize() == 0) continue; - EXPECT_DEBUG_DEATH(loadTag(P), ""); - EXPECT_DEBUG_DEATH(storeTag(P), ""); + EXPECT_DEATH(loadTag(P), ""); + EXPECT_DEATH(storeTag(P), ""); } } @@ -153,7 +153,7 @@ TEST_F(MemtagDeathTest, SKIP_NO_DEBUG(StoreTagsUnaligned)) { uptr Tagged = addFixedTag(P, 5); if (Tagged % archMemoryTagGranuleSize() == 0) continue; - EXPECT_DEBUG_DEATH(storeTags(Tagged, Tagged), ""); + EXPECT_DEATH(storeTags(Tagged, Tagged), ""); } } |