forked from OSchip/llvm-project
[asan] fix bug 14277 (asan needs to fail with fata error if an __asan interface function is being redefined. Before this fix asan asserts)
llvm-svn: 167529
This commit is contained in:
parent
3ca33acb95
commit
157a515376
|
@ -731,8 +731,9 @@ bool AddressSanitizer::doInitialization(Module &M) {
|
||||||
std::string FunctionName = std::string(kAsanReportErrorTemplate) +
|
std::string FunctionName = std::string(kAsanReportErrorTemplate) +
|
||||||
(AccessIsWrite ? "store" : "load") + itostr(1 << AccessSizeIndex);
|
(AccessIsWrite ? "store" : "load") + itostr(1 << AccessSizeIndex);
|
||||||
// If we are merging crash callbacks, they have two parameters.
|
// If we are merging crash callbacks, they have two parameters.
|
||||||
AsanErrorCallback[AccessIsWrite][AccessSizeIndex] = cast<Function>(
|
AsanErrorCallback[AccessIsWrite][AccessSizeIndex] =
|
||||||
M.getOrInsertFunction(FunctionName, IRB.getVoidTy(), IntptrTy, NULL));
|
checkInterfaceFunction(M.getOrInsertFunction(
|
||||||
|
FunctionName, IRB.getVoidTy(), IntptrTy, NULL));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue