[llvm] r322847 - [HWAsan] Fix uninitialized variable.

Benjamin Kramer via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 18 06:19:04 PST 2018


Author: d0k
Date: Thu Jan 18 06:19:04 2018
New Revision: 322847

URL: http://llvm.org/viewvc/llvm-project?rev=322847&view=rev
Log:
[HWAsan] Fix uninitialized variable.

Found by msan.

Modified:
    llvm/trunk/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp

Modified: llvm/trunk/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp?rev=322847&r1=322846&r2=322847&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp (original)
+++ llvm/trunk/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp Thu Jan 18 06:19:04 2018
@@ -186,6 +186,7 @@ bool HWAddressSanitizer::doInitializatio
   IntptrTy = IRB.getIntPtrTy(DL);
   Int8Ty = IRB.getInt8Ty();
 
+  HwasanCtorFunction = nullptr;
   if (!ClEnableKhwasan) {
     std::tie(HwasanCtorFunction, std::ignore) =
         createSanitizerCtorAndInitFunctions(M, kHwasanModuleCtorName,




More information about the llvm-commits mailing list