From 687d0781926e996d51fc7cd11e3b03d1cb9f6b1b Mon Sep 17 00:00:00 2001 From: Kostya Serebryany Date: Wed, 11 Jan 2012 18:15:23 +0000 Subject: [PATCH] [asan] extend the workaround for http://llvm.org/bugs/show_bug.cgi?id=11395: don't instrument the function at all on x86_32 if it has a large asm blob llvm-svn: 147953 --- llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp b/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp index dbd9ebaf55cc..e645a9fdbddf 100644 --- a/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp +++ b/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp @@ -617,6 +617,7 @@ bool AddressSanitizer::handleFunction(Module &M, Function &F) { TempsToInstrument.clear(); for (BasicBlock::iterator BI = FI->begin(), BE = FI->end(); BI != BE; ++BI) { + if (LooksLikeCodeInBug11395(BI)) return false; if ((isa(BI) && ClInstrumentReads) || (isa(BI) && ClInstrumentWrites)) { Value *Addr = getLDSTOperand(BI); @@ -792,7 +793,6 @@ bool AddressSanitizer::poisonStackInFunction(Module &M, Function &F) { BasicBlock &BB = *FI; for (BasicBlock::iterator BI = BB.begin(), BE = BB.end(); BI != BE; ++BI) { - if (LooksLikeCodeInBug11395(BI)) return false; if (isa(BI)) { RetVec.push_back(BI); continue;