diff options
author | Evgeniy Stepanov <eugeni.stepanov@gmail.com> | 2013-01-22 12:30:52 +0000 |
---|---|---|
committer | Evgeniy Stepanov <eugeni.stepanov@gmail.com> | 2013-01-22 12:30:52 +0000 |
commit | c4415591edb20bf2c0f882db47c0b7f382f859a4 (patch) | |
tree | 922691cf40a8c67f0aed160175d1b91bf082b8e3 /llvm/lib/Transforms | |
parent | ef68259d269a3a4c22efb4811afbd5157bccb8f1 (diff) | |
download | bcm5719-llvm-c4415591edb20bf2c0f882db47c0b7f382f859a4.tar.gz bcm5719-llvm-c4415591edb20bf2c0f882db47c0b7f382f859a4.zip |
[msan] Do not insert check on volatile store.
Volatile bitfields can cause valid stores of uninitialized bits.
llvm-svn: 173153
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r-- | llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp b/llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp index 618a6f0be47..8bb8115012a 100644 --- a/llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp +++ b/llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp @@ -451,9 +451,7 @@ struct MemorySanitizerVisitor : public InstVisitor<MemorySanitizerVisitor> { IRB.CreateAlignedStore(Shadow, ShadowPtr, I.getAlignment()); DEBUG(dbgs() << " STORE: " << *NewSI << "\n"); (void)NewSI; - // If the store is volatile, add a check. - if (I.isVolatile()) - insertCheck(Val, &I); + if (ClCheckAccessAddress) insertCheck(Addr, &I); @@ -847,7 +845,6 @@ struct MemorySanitizerVisitor : public InstVisitor<MemorySanitizerVisitor> { /// /// Stores the corresponding shadow and (optionally) origin. /// Optionally, checks that the store address is fully defined. - /// Volatile stores check that the value being stored is fully defined. void visitStoreInst(StoreInst &I) { StoreList.push_back(&I); } |