diff options
author | Alexander Potapenko <glider@google.com> | 2018-09-07 09:56:36 +0000 |
---|---|---|
committer | Alexander Potapenko <glider@google.com> | 2018-09-07 09:56:36 +0000 |
commit | 6301574cb4c3e420d4353f4df28cf54ac7de8f75 (patch) | |
tree | 31da2261a1fc84fb19aeec62b5b7c3deebc242df /llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp | |
parent | f76886859f1e9b08c0a1e51cf9b2efa7328610cc (diff) | |
download | bcm5719-llvm-6301574cb4c3e420d4353f4df28cf54ac7de8f75.tar.gz bcm5719-llvm-6301574cb4c3e420d4353f4df28cf54ac7de8f75.zip |
[MSan] don't access MsanCtorFunction when using KMSAN
MSan has found a use of uninitialized memory in MSan, fix it.
llvm-svn: 341646
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 c0066eb1128..6421b6efac4 100644 --- a/llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp +++ b/llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp @@ -4342,7 +4342,7 @@ static VarArgHelper *CreateVarArgHelper(Function &Func, MemorySanitizer &Msan, } bool MemorySanitizer::runOnFunction(Function &F) { - if (&F == MsanCtorFunction) + if (!CompileKernel && (&F == MsanCtorFunction)) return false; MemorySanitizerVisitor Visitor(F, *this); |