[llvm-bugs] [Bug 28808] New: crash in TypoCorrection with ill-formed source

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Aug 1 18:29:13 PDT 2016


https://llvm.org/bugs/show_bug.cgi?id=28808

            Bug ID: 28808
           Summary: crash in TypoCorrection with ill-formed source
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Frontend
          Assignee: unassignedclangbugs at nondot.org
          Reporter: Wolfgang_Pieb at playstation.sony.com
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

// A quick look in the debugger seems to point to use of a Scope 
// after it's been freed by the parser.

void foo() {
  do {
    for (;;)
      if (0)
        ;
      else if (0)
        ;
      else
        do
          if (0)
            if (0)
              do {
                {}
              } while(zz);
  } while (zz);
}

// clang -c test.cpp

#0 0x0000000001b4fa65 llvm::sys::PrintStackTrace(llvm::raw_ostream&)
/home/user/src/llvm/trunk/llvm/lib/Support/Unix/Signals.inc:406:0
#1 0x0000000001b4d9ae llvm::sys::RunSignalHandlers()
/home/user/src/llvm/trunk/llvm/lib/Support/Signals.cpp:45:0
#2 0x0000000001b4db12 SignalHandler(int)
/home/user/src/llvm/trunk/llvm/lib/Support/Unix/Signals.inc:246:0
#3 0x00007f820e278340 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x10340)
#4 0x00000000029bf2a8 findOuterContext(clang::Scope*)
/home/user/src/llvm/trunk/llvm/tools/clang/lib/Sema/SemaLookup.cpp:951:0
#5 0x00000000029d0f34 clang::Sema::CppLookupName(clang::LookupResult&,
clang::Scope*)
/home/user/src/llvm/trunk/llvm/tools/clang/lib/Sema/SemaLookup.cpp:1139:0
#6 0x00000000029d3645 clang::Sema::LookupName(clang::LookupResult&,
clang::Scope*, bool)
/home/user/src/llvm/trunk/llvm/tools/clang/lib/Sema/SemaLookup.cpp:1785:0
#7 0x00000000029d3c11 LookupPotentialTypoResult
/home/user/src/llvm/trunk/llvm/tools/clang/lib/Sema/SemaLookup.cpp:4297:0
#8 0x00000000029d3c11
clang::TypoCorrectionConsumer::resolveCorrection(clang::TypoCorrection&)
/home/user/src/llvm/trunk/llvm/tools/clang/lib/Sema/SemaLookup.cpp:4018:0
#9 0x00000000029d407b clang::TypoCorrectionConsumer::getNextCorrection()
/home/user/src/llvm/trunk/llvm/tools/clang/lib/Sema/SemaLookup.cpp:4002:0

etc.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20160802/bd61c9ae/attachment.html>


More information about the llvm-bugs mailing list