commit | 4881a23ca8127768c212ba271ca6ec4fe8930893 | [log] [tgz] |
---|---|---|
author | Matt Morehouse <mascasa@google.com> | Wed Sep 20 22:53:08 2017 +0000 |
committer | Matt Morehouse <mascasa@google.com> | Wed Sep 20 22:53:08 2017 +0000 |
tree | 1320adf7bb10b43aea4b807bfb768de544c02807 | |
parent | d44afff1b6ae85678c939a682e5f9df64536ef9a [diff] [blame] |
[MSan] Disable sanitization for __sanitizer_dtor_callback. Summary: Eliminate unnecessary instrumentation at __sanitizer_dtor_callback call sites. Fixes https://github.com/google/sanitizers/issues/861. Reviewers: eugenis, kcc Reviewed By: eugenis Subscribers: vitalybuka, llvm-commits, cfe-commits, hiraditya Differential Revision: https://reviews.llvm.org/D38063 llvm-svn: 313831
diff --git a/llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp b/llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp index b7c6271..3b33ced 100644 --- a/llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp +++ b/llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp
@@ -2588,6 +2588,7 @@ void visitCallSite(CallSite CS) { Instruction &I = *CS.getInstruction(); + if (I.getMetadata("nosanitize")) return; assert((CS.isCall() || CS.isInvoke()) && "Unknown type of CallSite"); if (CS.isCall()) { CallInst *Call = cast<CallInst>(&I);