forked from OSchip/llvm-project
[asan] Fix kernel callback naming in instrumentation module.
Right now clang uses "_n" suffix for some user space callbacks and "N" for the matching kernel ones. There's no need for this and it actually breaks kernel build with inline instrumentation. Use the same callback names for user space and the kernel (and also make them consistent with the names GCC uses). Patch by Andrey Konovalov. Differential Revision: https://reviews.llvm.org/D42423 llvm-svn: 323470
This commit is contained in:
parent
6fd634b11b
commit
31475a039a
|
@ -2247,7 +2247,6 @@ void AddressSanitizer::initializeCallbacks(Module &M) {
|
|||
for (size_t AccessIsWrite = 0; AccessIsWrite <= 1; AccessIsWrite++) {
|
||||
const std::string TypeStr = AccessIsWrite ? "store" : "load";
|
||||
const std::string ExpStr = Exp ? "exp_" : "";
|
||||
const std::string SuffixStr = CompileKernel ? "N" : "_n";
|
||||
const std::string EndingStr = Recover ? "_noabort" : "";
|
||||
|
||||
SmallVector<Type *, 3> Args2 = {IntptrTy, IntptrTy};
|
||||
|
@ -2259,8 +2258,7 @@ void AddressSanitizer::initializeCallbacks(Module &M) {
|
|||
}
|
||||
AsanErrorCallbackSized[AccessIsWrite][Exp] =
|
||||
checkSanitizerInterfaceFunction(M.getOrInsertFunction(
|
||||
kAsanReportErrorTemplate + ExpStr + TypeStr + SuffixStr +
|
||||
EndingStr,
|
||||
kAsanReportErrorTemplate + ExpStr + TypeStr + "_n" + EndingStr,
|
||||
FunctionType::get(IRB.getVoidTy(), Args2, false)));
|
||||
|
||||
AsanMemoryAccessCallbackSized[AccessIsWrite][Exp] =
|
||||
|
|
Loading…
Reference in New Issue