[compiler-rt] 4c699b1 - [msan] Don't EXPECT_POISONED beyond the we_wordv

Vitaly Buka via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 24 17:19:49 PDT 2021


Author: Vitaly Buka
Date: 2021-08-24T17:19:10-07:00
New Revision: 4c699b1cd04df33cbf6e9f84272cd3309e7cc984

URL: https://github.com/llvm/llvm-project/commit/4c699b1cd04df33cbf6e9f84272cd3309e7cc984
DIFF: https://github.com/llvm/llvm-project/commit/4c699b1cd04df33cbf6e9f84272cd3309e7cc984.diff

LOG: [msan] Don't EXPECT_POISONED beyond the we_wordv

Partially reverts commit 629411d799223d7bc7aad98661b1443a4788c0c5.

EXPECT_POISONED argument is outside of the allocation so we can't
assume the state of shadow there.

Added: 
    

Modified: 
    compiler-rt/lib/msan/tests/msan_test.cpp

Removed: 
    


################################################################################
diff  --git a/compiler-rt/lib/msan/tests/msan_test.cpp b/compiler-rt/lib/msan/tests/msan_test.cpp
index 3ddba8c885c92..7c9af6591787c 100644
--- a/compiler-rt/lib/msan/tests/msan_test.cpp
+++ b/compiler-rt/lib/msan/tests/msan_test.cpp
@@ -3758,7 +3758,6 @@ TEST(MemorySanitizer, wordexp) {
   ASSERT_STREQ("a", w.we_wordv[0]);
   ASSERT_STREQ("b", w.we_wordv[1]);
   ASSERT_STREQ("c", w.we_wordv[2]);
-  EXPECT_POISONED(w.we_wordv[3]);
 }
 
 TEST(MemorySanitizer, wordexp_initial_offset) {
@@ -3771,7 +3770,6 @@ TEST(MemorySanitizer, wordexp_initial_offset) {
   ASSERT_STREQ("a", w.we_wordv[1]);
   ASSERT_STREQ("b", w.we_wordv[2]);
   ASSERT_STREQ("c", w.we_wordv[3]);
-  EXPECT_POISONED(w.we_wordv[4]);
 }
 
 template<class T>


        


More information about the llvm-commits mailing list