From: Alexey Samsonov Date: Sat, 31 May 2014 00:33:05 +0000 (+0000) Subject: [ASan] Behave the same for functions w/o sanitize_address attribute and blacklisted... X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ea4269e7a86812fc6923e31cd1b675ab86cedfe4;p=platform%2Fupstream%2Fllvm.git [ASan] Behave the same for functions w/o sanitize_address attribute and blacklisted functions llvm-svn: 209946 --- diff --git a/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp b/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp index ede32fe..9e5fca7 100644 --- a/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp +++ b/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp @@ -1310,7 +1310,6 @@ bool AddressSanitizer::InjectCoverage(Function &F, } bool AddressSanitizer::runOnFunction(Function &F) { - if (BL->isIn(F)) return false; if (&F == AsanCtorFunction) return false; if (F.getLinkage() == GlobalValue::AvailableExternallyLinkage) return false; DEBUG(dbgs() << "ASAN instrumenting:\n" << F << "\n"); @@ -1319,7 +1318,7 @@ bool AddressSanitizer::runOnFunction(Function &F) { // If needed, insert __asan_init before checking for SanitizeAddress attr. maybeInsertAsanInitAtFunctionEntry(F); - if (!F.hasFnAttribute(Attribute::SanitizeAddress)) + if (!F.hasFnAttribute(Attribute::SanitizeAddress) || BL->isIn(F)) return false; if (!ClDebugFunc.empty() && ClDebugFunc != F.getName())