[lldb] crash on invalid input
- Dominant language
- LLVM
- Stars
- 40.5k
- Forks
- 18.7k
- PR merge metrics
- PR metrics pending
Description
With a debug build of lldb, it crashes with
```
(lldb) p }u,j()
@ 0x55f698ab60ba __assert_fail
@ 0x55f6882e6250 clang::Token::getIdentifierInfo()
@ 0x55f68a7f479b clang::Parser::expectIdentifier()
@ 0x55f68a927aca clang::Parser::ParseObjCProtocolReferences()
@ 0x55f68a92e73f clang::Parser::parseObjCProtocolQualifierType()
@ 0x55f68a8dbaa1 clang::Parser::ParseDeclarationSpecifiers()
@ 0x55f68a806558 clang::Parser::ParseDeclarationSpecifiers()
@ 0x55f68a7fc009 clang::Parser::ParseDeclOrFunctionDefInternal()
@ 0x55f68a7fb875 clang::Parser::ParseDeclarationOrFunctionDefinition()
@ 0x55f68a7fae46 clang::Parser::ParseExternalDeclaration()
@ 0x55f68a7f827d clang::Parser::ParseTopLevelDecl()
@ 0x55f68a7d8ad6 clang::ParseAST()
@ 0x55f688900f4f lldb_private::ClangExpressionParser::ParseInternal()
@ 0x55f68890145d lldb_private::ClangExpressionParser::Parse()
@ 0x55f688899384 lldb_private::ClangUserExpression::TryParse()
@ 0x55f688899bd4 lldb_private::ClangUserExpression::Parse()
@ 0x55f687ec8d59 lldb_private::UserExpression::Evaluate()
@ 0x55f688b99ffd lldb_private::Target::EvaluateExpression()
@ 0x55f687f70463 lldb_private::CommandObjectDWIMPrint::DoExecute()
@ 0x55f688140480 lldb_private::CommandObjectRaw::Execute()
@ 0x55f687eddbe2 lldb_private::CommandInterpreter::HandleCommand()
@ 0x55f687ee3805 lldb_private::CommandInterpreter::IOHandlerInputComplete()
@ 0x55f687ee4009 lldb_private::CommandInterpreter::IOHandlerInputComplete()
@ 0x55f687d0d536 lldb_private::IOHandlerEditline::Run()
@ 0x55f687c99892 lldb_private::Debugger::RunIOHandlers()
@ 0x55f687ee5978 lldb_private::CommandInterpreter::RunCommandInterpreter()
@ 0x55f67fbe00aa lldb::SBDebugger::RunCommandInterpreter()
@ 0x55f67fb9a406 Driver::MainLoop()
@ 0x55f67fb9af6a main
@ 0x7f6a44e763d4 __libc_start_main
@ 0x55f67fb9602a _start
PLEASE submit a bug report to go/lldb-crash-bug and include the crash backtrace.
```
You can reproduce this with this invalid input ` p }u,j
Contributor guide
Assessment
This issue has not been assessed yet.