diff options
author | Evgeniy Stepanov <eugeni.stepanov@gmail.com> | 2014-06-25 14:41:57 +0000 |
---|---|---|
committer | Evgeniy Stepanov <eugeni.stepanov@gmail.com> | 2014-06-25 14:41:57 +0000 |
commit | b163f0276f19ec207b3dafba398b0f273787c570 (patch) | |
tree | 6611a5e0b812c63ea917412dadf412f9400eb048 /llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp | |
parent | a8acef6c6845920c557ac0d302fe4974ffe9ff44 (diff) | |
download | bcm5719-llvm-b163f0276f19ec207b3dafba398b0f273787c570.tar.gz bcm5719-llvm-b163f0276f19ec207b3dafba398b0f273787c570.zip |
[msan] Fix bad interaction between with-calls mode and chained origin tracking.
Origin history should only be recorded for uninitialized values, because it is
meaningless otherwise. This change moves __msan_chain_origin to the runtime
library side and makes it conditional on the corresponding shadow value.
Previous code was correct, but _very_ inefficient.
llvm-svn: 211700
Diffstat (limited to 'llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp')
-rw-r--r-- | llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp b/llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp index 75c56c2d430..4ca03238071 100644 --- a/llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp +++ b/llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp @@ -569,7 +569,7 @@ struct MemorySanitizerVisitor : public InstVisitor<MemorySanitizerVisitor> { ConvertedShadow, IRB.getIntNTy(8 * (1 << SizeIndex))); IRB.CreateCall3(Fn, ConvertedShadow2, IRB.CreatePointerCast(Addr, IRB.getInt8PtrTy()), - updateOrigin(Origin, IRB)); + Origin); } else { Value *Cmp = IRB.CreateICmpNE( ConvertedShadow, getCleanShadow(ConvertedShadow), "_mscmp"); |