[compiler-rt] r302887 - [msan] Remove a failing test from MemorySanitizer.ICmpRelational

Alexander Potapenko via llvm-commits llvm-commits at lists.llvm.org
Fri May 12 02:39:32 PDT 2017


Author: glider
Date: Fri May 12 04:39:32 2017
New Revision: 302887

URL: http://llvm.org/viewvc/llvm-project?rev=302887&view=rev
Log:
[msan] Remove a failing test from MemorySanitizer.ICmpRelational

This is a follow-up to r302787, which broke MemorySanitizer.ICmpRelational.

MSan is now reporting a false positive on the following test case:
  TestForNotPoisoned((poisoned(-1, 0x80000000U) >= poisoned(-1, 0U)))
, which is sort of anticipated, because we're approximating the comparison
with an OR of the arguments' shadow values.

Modified:
    compiler-rt/trunk/lib/msan/tests/msan_test.cc

Modified: compiler-rt/trunk/lib/msan/tests/msan_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/msan/tests/msan_test.cc?rev=302887&r1=302886&r2=302887&view=diff
==============================================================================
--- compiler-rt/trunk/lib/msan/tests/msan_test.cc (original)
+++ compiler-rt/trunk/lib/msan/tests/msan_test.cc Fri May 12 04:39:32 2017
@@ -3724,8 +3724,10 @@ TEST(MemorySanitizer, ICmpRelational) {
 
   EXPECT_POISONED(poisoned(6, 0xF) > poisoned(7, 0));
   EXPECT_POISONED(poisoned(0xF, 0xF) > poisoned(7, 0));
-
-  EXPECT_NOT_POISONED(poisoned(-1, 0x80000000U) >= poisoned(-1, 0U));
+  // Note that "icmp op X, Y" is approximated with "or shadow(X), shadow(Y)"
+  // and therefore may generate false positives in some cases, e.g. the
+  // following one:
+  // EXPECT_NOT_POISONED(poisoned(-1, 0x80000000U) >= poisoned(-1, 0U));
 }
 
 #if MSAN_HAS_M128




More information about the llvm-commits mailing list