<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - crash when auto-completion is triggered"
   href="https://bugs.llvm.org/show_bug.cgi?id=51299">51299</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>crash when auto-completion is triggered
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>lldb
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>12.0
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>All Bugs
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>lldb-dev@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>manas18244@iiitd.ac.in
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>jdevlieghere@apple.com, llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>I was traversing through Clang Static Analyzer's codebase via lldb (12.0.1) and
I hit <Tab> generally for auto-completion of certain variables. But at one
particular instance lldb crashed with the following stack trace. To be
specific, there is a variable `Assumption` and I typed `p Assum<Tab>` and it
crashed.

(lldb) p AssumPLEASE submit a bug report to <a href="https://bugs.llvm.org/">https://bugs.llvm.org/</a> and include
the crash backtrace.
Stack dump:
0.      Program arguments: lldb -s lldb-cmds-csa.txt ./bin/clang
1.      <user expression 254>:1:1: current parser token 'Assum'
2.      <lldb wrapper prefix>:44:1: parsing function body
'clang::ento::SimpleConstraintManager::$__lldb_expr'
3.      <lldb wrapper prefix>:44:1: in compound statement ('{}')
 #0 0x00007f331fca9793 (/usr/bin/../lib/libLLVM-12.so+0xb49793)
 #1 0x00007f331fca6e96 (/usr/bin/../lib/libLLVM-12.so+0xb46e96)
 #2 0x00007f3326773870 __restore_rt (/usr/bin/../lib/libpthread.so.0+0x13870)
 #3 0x00007f331c88a9af (/usr/bin/../lib/../lib/libclang-cpp.so.12+0x15549af)
 #4 0x00007f331c88ba61 (/usr/bin/../lib/../lib/libclang-cpp.so.12+0x1555a61)
 #5 0x00007f331c88c840 clang::Sema::LookupVisibleDecls(clang::Scope*,
clang::Sema::LookupNameKind, clang::VisibleDeclConsumer&, bool, bool)
(/usr/bin/../lib/../lib/libclang-cpp.so.12+0x1556840)
 #6 0x00007f331c4ac8a0 clang::Sema::CodeCompleteOrdinaryName(clang::Scope*,
clang::Sema::ParserCompletionContext)
(/usr/bin/../lib/../lib/libclang-cpp.so.12+0x11768a0)
 #7 0x00007f331bd22583
clang::Parser::ParseStatementOrDeclarationAfterAttributes(llvm::SmallVector<clang::Stmt*,
32u>&, clang::Parser::ParsedStmtContext, clang::SourceLocation*,
clang::Parser::ParsedAttributesWithRange&)
(/usr/bin/../lib/../lib/libclang-cpp.so.12+0x9ec583)
 #8 0x00007f331bd23468
clang::Parser::ParseStatementOrDeclaration(llvm::SmallVector<clang::Stmt*,
32u>&, clang::Parser::ParsedStmtContext, clang::SourceLocation*)
(/usr/bin/../lib/../lib/libclang-cpp.so.12+0x9ed468)
 #9 0x00007f331bd2420a clang::Parser::ParseCompoundStatementBody(bool)
(/usr/bin/../lib/../lib/libclang-cpp.so.12+0x9ee20a)
#10 0x00007f331bd26dfb clang::Parser::ParseFunctionStatementBody(clang::Decl*,
clang::Parser::ParseScope&)
(/usr/bin/../lib/../lib/libclang-cpp.so.12+0x9f0dfb)
#11 0x00007f331bd5963a
clang::Parser::ParseFunctionDefinition(clang::ParsingDeclarator&,
clang::Parser::ParsedTemplateInfo const&, clang::Parser::LateParsedAttrList*)
(/usr/bin/../lib/../lib/libclang-cpp.so.12+0xa2363a)
#12 0x00007f331bc962e1 clang::Parser::ParseDeclGroup(clang::ParsingDeclSpec&,
clang::DeclaratorContext, clang::SourceLocation*, clang::Parser::ForRangeInit*)
(/usr/bin/../lib/../lib/libclang-cpp.so.12+0x9602e1)
#13 0x00007f331bd551e5 (/usr/bin/../lib/../lib/libclang-cpp.so.12+0xa1f1e5)
#14 0x00007f331bd5b8ae
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*) (/usr/bin/../lib/../lib/libclang-cpp.so.12+0xa258ae)
#15 0x00007f331bd5c92a
clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&, bool)
(/usr/bin/../lib/../lib/libclang-cpp.so.12+0xa2692a)
#16 0x00007f331bc6d432 clang::ParseAST(clang::Sema&, bool, bool)
(/usr/bin/../lib/../lib/libclang-cpp.so.12+0x937432)
#17 0x00007f332623d270 (/usr/bin/../lib/liblldb.so.12+0xe32270)
#18 0x00007f332623f716 (/usr/bin/../lib/liblldb.so.12+0xe34716)
#19 0x00007f332621e73a (/usr/bin/../lib/liblldb.so.12+0xe1373a)
#20 0x00007f3326149cbf (/usr/bin/../lib/liblldb.so.12+0xd3ecbf)
#21 0x00007f3325b846c6 (/usr/bin/../lib/liblldb.so.12+0x7796c6)
#22 0x00007f331e78e6f5 el_wgets (/usr/bin/../lib/../lib/libedit.so.0+0x116f5)
#23 0x00007f3325b81cff (/usr/bin/../lib/liblldb.so.12+0x776cff)
#24 0x00007f3325abfd20 (/usr/bin/../lib/liblldb.so.12+0x6b4d20)
#25 0x00007f3325ac1096 (/usr/bin/../lib/liblldb.so.12+0x6b6096)
#26 0x00007f3325a98e32 (/usr/bin/../lib/liblldb.so.12+0x68de32)
#27 0x00007f3325ba3d95 (/usr/bin/../lib/liblldb.so.12+0x798d95)
#28 0x00007f33256a8ef2 lldb::SBDebugger::RunCommandInterpreter(bool, bool)
(/usr/bin/../lib/liblldb.so.12+0x29def2)
#29 0x00005585a6079e18 (/usr/bin/lldb+0x7e18)
#30 0x00005585a60788a1 (/usr/bin/lldb+0x68a1)
#31 0x00007f331eda5b25 __libc_start_main (/usr/bin/../lib/libc.so.6+0x27b25)
#32 0x00005585a607891e (/usr/bin/lldb+0x691e)
Segmentation fault (core dumped)</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>