[asan] extend the workaround for http://llvm.org/bugs/show_bug.cgi?id=11395: don...
authorKostya Serebryany <kcc@google.com>
Wed, 11 Jan 2012 18:15:23 +0000 (18:15 +0000)
committerKostya Serebryany <kcc@google.com>
Wed, 11 Jan 2012 18:15:23 +0000 (18:15 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147953 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Instrumentation/AddressSanitizer.cpp

index dbd9ebaf55cc0d4ff847496e6ef082269e921eed..e645a9fdbddf4dc7a41b90cc1d2bbf2ed68c0a1e 100644 (file)
@@ -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<LoadInst>(BI) && ClInstrumentReads) ||
           (isa<StoreInst>(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<ReturnInst>(BI)) {
           RetVec.push_back(BI);
           continue;