[asan] fix bug 14277 (asan needs to fail with fata error if an __asan interface funct...
authorKostya Serebryany <kcc@google.com>
Wed, 7 Nov 2012 12:42:18 +0000 (12:42 +0000)
committerKostya Serebryany <kcc@google.com>
Wed, 7 Nov 2012 12:42:18 +0000 (12:42 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167529 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Instrumentation/AddressSanitizer.cpp

index 93f785ca5b0527f39c72d1ee11ba8a28de3a6b91..b7be4625ca8d5d8b35740fd2a3aebae410fd5a50 100644 (file)
@@ -731,8 +731,9 @@ bool AddressSanitizer::doInitialization(Module &M) {
       std::string FunctionName = std::string(kAsanReportErrorTemplate) +
           (AccessIsWrite ? "store" : "load") + itostr(1 << AccessSizeIndex);
       // If we are merging crash callbacks, they have two parameters.
-      AsanErrorCallback[AccessIsWrite][AccessSizeIndex] = cast<Function>(
-          M.getOrInsertFunction(FunctionName, IRB.getVoidTy(), IntptrTy, NULL));
+      AsanErrorCallback[AccessIsWrite][AccessSizeIndex] =
+          checkInterfaceFunction(M.getOrInsertFunction(
+              FunctionName, IRB.getVoidTy(), IntptrTy, NULL));
     }
   }