[compiler-rt] r204707 - [msan] A disabled test for inexact "select" instrumentation.
Evgeniy Stepanov
eugeni.stepanov at gmail.com
Tue Mar 25 02:36:16 PDT 2014
Author: eugenis
Date: Tue Mar 25 04:36:15 2014
New Revision: 204707
URL: http://llvm.org/viewvc/llvm-project?rev=204707&view=rev
Log:
[msan] A disabled test for inexact "select" instrumentation.
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=204707&r1=204706&r2=204707&view=diff
==============================================================================
--- compiler-rt/trunk/lib/msan/tests/msan_test.cc (original)
+++ compiler-rt/trunk/lib/msan/tests/msan_test.cc Tue Mar 25 04:36:15 2014
@@ -3791,6 +3791,26 @@ TEST(MemorySanitizer, Select) {
EXPECT_POISONED(z);
}
+TEST(MemorySanitizer, DISABLED_SelectPartial) {
+ // Precise instrumentation of select.
+ // Some bits of the result do not depend on select condition, and must stay
+ // initialized even if select condition is not. These are the bits that are
+ // equal and initialized in both left and right select arguments.
+ U4 x = 0xFFFFABCDU;
+ U4 x_s = 0xFFFF0000U;
+ __msan_partial_poison(&x, &x_s, sizeof(x));
+ U4 y = 0xAB00;
+ U1 cond = true;
+ __msan_poison(&cond, sizeof(cond));
+ U4 z = cond ? x : y;
+ __msan_print_shadow(&z, sizeof(z));
+ EXPECT_POISONED(z & 0xFFU);
+ EXPECT_NOT_POISONED(z & 0xFF00U);
+ EXPECT_POISONED(z & 0xFF0000U);
+ EXPECT_POISONED(z & 0xFF000000U);
+ EXPECT_EQ(0xAB00, z & 0xFF00U);
+}
+
TEST(MemorySanitizerStress, DISABLED_MallocStackTrace) {
RecursiveMalloc(22);
}
More information about the llvm-commits
mailing list