[msan] Don't EXPECT_POISONED beyond the we_wordv
authorVitaly Buka <vitalybuka@google.com>
Wed, 25 Aug 2021 00:11:51 +0000 (17:11 -0700)
committerVitaly Buka <vitalybuka@google.com>
Wed, 25 Aug 2021 00:19:10 +0000 (17:19 -0700)
Partially reverts commit 629411d799223d7bc7aad98661b1443a4788c0c5.

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

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

index 3ddba8c..7c9af65 100644 (file)
@@ -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>