[llvm-bugs] [Bug 47522] New: Assertion `isHandleInSync() && "invalid iterator access!"' failed

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Sep 14 05:44:21 PDT 2020


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

            Bug ID: 47522
           Summary: Assertion `isHandleInSync() && "invalid iterator
                    access!"' failed
           Product: lldb
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: All Bugs
          Assignee: lldb-dev at lists.llvm.org
          Reporter: dmantipov at yandex.ru
                CC: jdevlieghere at apple.com, llvm-bugs at lists.llvm.org

Attempt to complete symbol name produces the following crash:

sysroot@/home/antipov/llvm> /home/antipov/.local/llvm-devel-12.0.0/bin/lldb
/home/antipov/.local/llvm-devel-12.0.0/bin/clang
(lldb) target create "/home/antipov/.local/llvm-devel-12.0.0/bin/clang"
Current executable set to '/home/antipov/.local/llvm-devel-12.0.0/bin/clang'
(x86_64).
(lldb) breakpoint set -f Gnu.cpp -l 1958
Breakpoint 1: no locations (pending).
WARNING:  Unable to resolve breakpoint to any actual locations.
(lldb) process launch -- -xc++ /dev/null
Process 1028276 launched: '/home/antipov/.local/llvm-devel-12.0.0/bin/clang'
(x86_64)
1 location added to breakpoint 1
Process 1028276 stopped
* thread #1, name = 'clang', stop reason = breakpoint 1.1
    frame #0: 0x00007ffff693c6ac
libclang-cpp.so.12git`clang::driver::toolchains::Generic_GCC::GCCInstallationDetector::init(this=0x0000000000499aa0,
TargetTriple=<unavailable>, Args=<unavailable>, ExtraTripleAliases=(Data =
0x0000000000000000, Length = 0)) at Gnu.cpp:1958:12
   1955     }
   1956     for (StringRef Suffix : CandidateBiarchLibDirs) {
   1957       const std::string LibDir = Prefix + Suffix.str();
-> 1958       if (!D.getVFS().exists(LibDir))
   1959         continue;
   1960       for (StringRef Candidate : CandidateBiarchTripleAliases)
   1961         ScanLibDirForGCCTriple(TargetTriple, Args, LibDir, Candidate,
(lldb) p Can[THEN PRESS TAB HERE]

==>

lldb: /home/antipov/llvm/source/llvm/include/llvm/ADT/DenseMap.h:1263:
DenseMapIterator<KeyT, ValueT, KeyInfoT, Bucket, IsConst>
&llvm::DenseMapIterator<clang::DeclarationName, clang::StoredDeclsList,
llvm::DenseMapInfo<clang::DeclarationName>,
llvm::detail::DenseMapPair<clang::DeclarationName, clang::StoredDeclsList>,
false>::operator++() [KeyT = clang::DeclarationName, ValueT =
clang::StoredDeclsList, KeyInfoT = llvm::DenseMapInfo<clang::DeclarationName>,
Bucket = llvm::detail::DenseMapPair<clang::DeclarationName,
clang::StoredDeclsList>, IsConst = false]: Assertion `isHandleInSync() &&
"invalid iterator access!"' failed.
PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash
backtrace.
Stack dump:
0.      Program arguments: /home/antipov/.local/llvm-devel-12.0.0/bin/lldb
/home/antipov/.local/llvm-devel-12.0.0/bin/clang 
1.      <user expression 0>:1:1: current parser token 'Can'
2.      <lldb wrapper prefix>:42:1: parsing function body
'clang::driver::toolchains::Generic_GCC::GCCInstallationDetector::$__lldb_expr'
3.      <lldb wrapper prefix>:42:1: in compound statement ('{}')
 #0 0x00007f0367b537b3 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int)
/home/antipov/llvm/source/llvm/lib/Support/Unix/Signals.inc:563:13
 #1 0x00007f0367b51b00 llvm::sys::RunSignalHandlers()
/home/antipov/llvm/source/llvm/lib/Support/Signals.cpp:71:18
 #2 0x00007f0367b53ae5 SignalHandler(int)
/home/antipov/llvm/source/llvm/lib/Support/Unix/Signals.inc:0:3
 #3 0x00007f0371c0da90 __restore_rt (/lib64/libpthread.so.0+0x14a90)
 #4 0x00007f0366ab89e5 raise (/lib64/libc.so.6+0x3c9e5)
 #5 0x00007f0366aa1895 abort (/lib64/libc.so.6+0x25895)
 #6 0x00007f0366aa1769 _nl_load_domain.cold (/lib64/libc.so.6+0x25769)
 #7 0x00007f0366ab0e76 (/lib64/libc.so.6+0x34e76)
 #8 0x00007f036dd8af09 llvm::DenseMapIterator<clang::DeclarationName,
clang::StoredDeclsList, llvm::DenseMapInfo<clang::DeclarationName>,
llvm::detail::DenseMapPair<clang::DeclarationName, clang::StoredDeclsList>,
false>::operator!=(llvm::DenseMapIterator<clang::DeclarationName,
clang::StoredDeclsList, llvm::DenseMapInfo<clang::DeclarationName>,
llvm::detail::DenseMapPair<clang::DeclarationName, clang::StoredDeclsList>,
true> const&) const
/home/antipov/llvm/source/llvm/include/llvm/ADT/DenseMap.h:1257:5
 #9 0x00007f036dd8af09 clang::DeclContext::all_lookups_iterator::operator++()
/home/antipov/llvm/source/llvm/tools/clang/include/clang/AST/DeclLookups.h:54:17
#10 0x00007f036e8300fd (anonymous
namespace)::LookupVisibleHelper::lookupInDeclContext(clang::DeclContext*,
clang::LookupResult&, bool, bool)
/home/antipov/llvm/source/llvm/tools/clang/lib/Sema/SemaLookup.cpp:0:36
#11 0x00007f036e82f984 (anonymous
namespace)::LookupVisibleHelper::lookupInScope(clang::Scope*,
clang::LookupResult&, (anonymous namespace)::UnqualUsingDirectiveSet&)
/home/antipov/llvm/source/llvm/tools/clang/lib/Sema/SemaLookup.cpp:0:9
#12 0x00007f036e824f4f
std::__cxx11::list<llvm::DenseMap<clang::DeclarationName,
llvm::TinyPtrVector<clang::NamedDecl*>,
llvm::DenseMapInfo<clang::DeclarationName>,
llvm::detail::DenseMapPair<clang::DeclarationName,
llvm::TinyPtrVector<clang::NamedDecl*> > >,
std::allocator<llvm::DenseMap<clang::DeclarationName,
llvm::TinyPtrVector<clang::NamedDecl*>,
llvm::DenseMapInfo<clang::DeclarationName>,
llvm::detail::DenseMapPair<clang::DeclarationName,
llvm::TinyPtrVector<clang::NamedDecl*> > > > >::pop_back()
/usr/lib/gcc/x86_64-redhat-linux/10/../../../../include/c++/10/bits/stl_list.h:1247:55
#13 0x00007f036e824f4f (anonymous
namespace)::ShadowContextRAII::~ShadowContextRAII()
/home/antipov/llvm/source/llvm/tools/clang/lib/Sema/SemaLookup.cpp:3603:24
#14 0x00007f036e824f4f (anonymous
namespace)::LookupVisibleHelper::lookupVisibleDecls(clang::Sema&,
clang::Scope*, clang::Sema::LookupNameKind, bool)
/home/antipov/llvm/source/llvm/tools/clang/lib/Sema/SemaLookup.cpp:3683:3
#15 0x00007f036e824f4f clang::Sema::LookupVisibleDecls(clang::Scope*,
clang::Sema::LookupNameKind, clang::VisibleDeclConsumer&, bool, bool)
/home/antipov/llvm/source/llvm/tools/clang/lib/Sema/SemaLookup.cpp:3983:5
#16 0x00007f036e43755b clang::Sema::CodeCompleteOrdinaryName(clang::Scope*,
clang::Sema::ParserCompletionContext)
/home/antipov/llvm/source/llvm/tools/clang/lib/Sema/SemaCodeComplete.cpp:0:3
#17 0x00007f036dcfb43f clang::Parser::cutOffParsing()
/home/antipov/llvm/source/llvm/tools/clang/include/clang/Parse/Parser.h:664:9
#18 0x00007f036dcfb43f
clang::Parser::ParseStatementOrDeclarationAfterAttributes(llvm::SmallVector<clang::Stmt*,
32u>&, clang::Parser::ParsedStmtContext, clang::SourceLocation*,
clang::Parser::ParsedAttributesWithRange&)
/home/antipov/llvm/source/llvm/tools/clang/lib/Parse/ParseStmt.cpp:175:5
#19 0x00007f036dcfaa32
clang::Parser::ParseStatementOrDeclaration(llvm::SmallVector<clang::Stmt*,
32u>&, clang::Parser::ParsedStmtContext, clang::SourceLocation*)
/home/antipov/llvm/source/llvm/tools/clang/lib/Parse/ParseStmt.cpp:106:20
#20 0x00007f036dd02cd2 clang::Parser::ParseCompoundStatementBody(bool)
/home/antipov/llvm/source/llvm/tools/clang/lib/Parse/ParseStmt.cpp:1098:11
#21 0x00007f036dd03be0 clang::Parser::ParseFunctionStatementBody(clang::Decl*,
clang::Parser::ParseScope&)
/home/antipov/llvm/source/llvm/tools/clang/lib/Parse/ParseStmt.cpp:2259:21
#22 0x00007f036dd1eab7
clang::Parser::ParseFunctionDefinition(clang::ParsingDeclarator&,
clang::Parser::ParsedTemplateInfo const&, clang::Parser::LateParsedAttrList*)
/home/antipov/llvm/source/llvm/tools/clang/lib/Parse/Parser.cpp:0:0
#23 0x00007f036dc79b66 clang::Parser::ParseDeclGroup(clang::ParsingDeclSpec&,
clang::DeclaratorContext, clang::SourceLocation*, clang::Parser::ForRangeInit*)
/home/antipov/llvm/source/llvm/tools/clang/lib/Parse/ParseDecl.cpp:1926:18
#24 0x00007f036dd1db5c
clang::Parser::ParseDeclOrFunctionDefInternal(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec&, clang::AccessSpecifier)
/home/antipov/llvm/source/llvm/tools/clang/lib/Parse/Parser.cpp:0:10
#25 0x00007f036dd1d50c
clang::Parser::ParseDeclarationOrFunctionDefinition(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*, clang::AccessSpecifier)
/home/antipov/llvm/source/llvm/tools/clang/lib/Parse/Parser.cpp:1151:12
#26 0x00007f036dd1c47f
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*)
/home/antipov/llvm/source/llvm/tools/clang/lib/Parse/Parser.cpp:0:12
#27 0x00007f036dd1a64d
clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&, bool)
/home/antipov/llvm/source/llvm/tools/clang/lib/Parse/Parser.cpp:716:10
#28 0x00007f036dc6460d clang::ParseAST(clang::Sema&, bool, bool)
/home/antipov/llvm/source/llvm/tools/clang/lib/Parse/ParseAST.cpp:157:5
#29 0x00007f037163a1b6 llvm::CrashRecoveryContextCleanupRegistrar<clang::Sema,
llvm::CrashRecoveryContextDeleteCleanup<clang::Sema> >::unregister()
/home/antipov/llvm/source/llvm/include/llvm/Support/CrashRecoveryContext.h:259:9
#30 0x00007f037163a1b6 llvm::CrashRecoveryContextCleanupRegistrar<clang::Sema,
llvm::CrashRecoveryContextDeleteCleanup<clang::Sema>
>::~CrashRecoveryContextCleanupRegistrar()
/home/antipov/llvm/source/llvm/include/llvm/Support/CrashRecoveryContext.h:256:45
#31 0x00007f037163a1b6
lldb_private::ClangExpressionParser::ParseInternal(lldb_private::DiagnosticManager&,
clang::CodeCompleteConsumer*, unsigned int, unsigned int)
/home/antipov/llvm/source/llvm/tools/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp:1108:3
#32 0x00007f0371639741 __gnu_cxx::__normal_iterator<(anonymous
namespace)::CodeComplete::CompletionWithPriority*, std::vector<(anonymous
namespace)::CodeComplete::CompletionWithPriority, std::allocator<(anonymous
namespace)::CodeComplete::CompletionWithPriority> >
>::__normal_iterator((anonymous
namespace)::CodeComplete::CompletionWithPriority* const&)
/usr/lib/gcc/x86_64-redhat-linux/10/../../../../include/c++/10/bits/stl_iterator.h:954:20
#33 0x00007f0371639741 std::vector<(anonymous
namespace)::CodeComplete::CompletionWithPriority, std::allocator<(anonymous
namespace)::CodeComplete::CompletionWithPriority> >::begin()
/usr/lib/gcc/x86_64-redhat-linux/10/../../../../include/c++/10/bits/stl_vector.h:812:16
#34 0x00007f0371639741 decltype(fp.begin()) std::begin<std::vector<(anonymous
namespace)::CodeComplete::CompletionWithPriority, std::allocator<(anonymous
namespace)::CodeComplete::CompletionWithPriority> > >(std::vector<(anonymous
namespace)::CodeComplete::CompletionWithPriority, std::allocator<(anonymous
namespace)::CodeComplete::CompletionWithPriority> >&)
/usr/lib/gcc/x86_64-redhat-linux/10/../../../../include/c++/10/bits/range_access.h:52:21
#35 0x00007f0371639741 decltype(auto)
llvm::adl_detail::adl_begin<std::vector<(anonymous
namespace)::CodeComplete::CompletionWithPriority, std::allocator<(anonymous
namespace)::CodeComplete::CompletionWithPriority> >&>(std::vector<(anonymous
namespace)::CodeComplete::CompletionWithPriority, std::allocator<(anonymous
namespace)::CodeComplete::CompletionWithPriority> >&)
/home/antipov/llvm/source/llvm/include/llvm/ADT/STLExtras.h:219:10
#36 0x00007f0371639741 decltype(auto) llvm::adl_begin<std::vector<(anonymous
namespace)::CodeComplete::CompletionWithPriority, std::allocator<(anonymous
namespace)::CodeComplete::CompletionWithPriority> >&>(std::vector<(anonymous
namespace)::CodeComplete::CompletionWithPriority, std::allocator<(anonymous
namespace)::CodeComplete::CompletionWithPriority> >&)
/home/antipov/llvm/source/llvm/include/llvm/ADT/STLExtras.h:241:10
#37 0x00007f0371639741 void llvm::sort<std::vector<(anonymous
namespace)::CodeComplete::CompletionWithPriority, std::allocator<(anonymous
namespace)::CodeComplete::CompletionWithPriority> >&>(std::vector<(anonymous
namespace)::CodeComplete::CompletionWithPriority, std::allocator<(anonymous
namespace)::CodeComplete::CompletionWithPriority> >&)
/home/antipov/llvm/source/llvm/include/llvm/ADT/STLExtras.h:1450:14
#38 0x00007f0371639741 (anonymous
namespace)::CodeComplete::GetCompletions(lldb_private::CompletionRequest&)
/home/antipov/llvm/source/llvm/tools/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp:888:5
#39 0x00007f0371639741
lldb_private::ClangExpressionParser::Complete(lldb_private::CompletionRequest&,
unsigned int, unsigned int, unsigned int)
/home/antipov/llvm/source/llvm/tools/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp:961:6
#40 0x00007f0371623d4e
lldb_private::ClangUserExpression::Complete(lldb_private::ExecutionContext&,
lldb_private::CompletionRequest&, unsigned int)
/home/antipov/llvm/source/llvm/tools/lldb/source/Plugins/ExpressionParser/Clang/ClangUserExpression.cpp:0:10
#41 0x00007f037158b432 __gnu_cxx::__exchange_and_add_dispatch(int*, int)
/usr/lib/gcc/x86_64-redhat-linux/10/../../../../include/c++/10/ext/atomicity.h:83:9
#42 0x00007f037158b432
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release()
/usr/lib/gcc/x86_64-redhat-linux/10/../../../../include/c++/10/bits/shared_ptr_base.h:155:6
#43 0x00007f037158b432
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
/usr/lib/gcc/x86_64-redhat-linux/10/../../../../include/c++/10/bits/shared_ptr_base.h:733:11
#44 0x00007f037158b432 std::__shared_ptr<lldb_private::UserExpression,
(__gnu_cxx::_Lock_policy)2>::~__shared_ptr()
/usr/lib/gcc/x86_64-redhat-linux/10/../../../../include/c++/10/bits/shared_ptr_base.h:1183:31
#45 0x00007f037158b432
lldb_private::CommandObjectExpression::HandleCompletion(lldb_private::CompletionRequest&)
/home/antipov/llvm/source/llvm/tools/lldb/source/Commands/CommandObjectExpression.cpp:352:1
#46 0x00007f03710f37e1
lldb_private::CommandInterpreter::HandleCompletionMatches(lldb_private::CompletionRequest&)
/home/antipov/llvm/source/llvm/tools/lldb/source/Interpreter/CommandInterpreter.cpp:1858:1
#47 0x00007f03710f395a
lldb_private::CommandInterpreter::HandleCompletion(lldb_private::CompletionRequest&)
/home/antipov/llvm/source/llvm/tools/lldb/source/Interpreter/CommandInterpreter.cpp:1880:1
#48 0x00007f03710cd4bf std::vector<lldb_private::CompletionResult::Completion,
std::allocator<lldb_private::CompletionResult::Completion> >::data() const
/usr/lib/gcc/x86_64-redhat-linux/10/../../../../include/c++/10/bits/stl_vector.h:1173:42
#49 0x00007f03710cd4bf
llvm::ArrayRef<lldb_private::CompletionResult::Completion>::ArrayRef<std::allocator<lldb_private::CompletionResult::Completion>
>(std::vector<lldb_private::CompletionResult::Completion,
std::allocator<lldb_private::CompletionResult::Completion> > const&)
/home/antipov/llvm/source/llvm/include/llvm/ADT/ArrayRef.h:88:18
#50 0x00007f03710cd4bf lldb_private::CompletionResult::GetResults() const
/home/antipov/llvm/source/llvm/tools/lldb/include/lldb/Utility/CompletionRequest.h:78:58
#51 0x00007f03710cd4bf lldb_private::Editline::TabCommand(int)
/home/antipov/llvm/source/llvm/tools/lldb/source/Host/common/Editline.cpp:993:65
#52 0x00007f03710d01e9
lldb_private::Editline::ConfigureEditor(bool)::$_14::__invoke(editline*, int)
/home/antipov/llvm/source/llvm/tools/lldb/source/Host/common/Editline.cpp:1195:51
#53 0x00007f03664ccee4 el_wgets (/lib64/libedit.so.0+0x12ee4)
#54 0x00007f03710cf920
lldb_private::Editline::GetLine(std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> >&, bool&)
/home/antipov/llvm/source/llvm/tools/lldb/source/Host/common/Editline.cpp:1499:33
#55 0x00007f037103e89b
lldb_private::IOHandlerEditline::GetLine(std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> >&, bool&)
/home/antipov/llvm/source/llvm/tools/lldb/source/Core/IOHandler.cpp:335:11
#56 0x00007f037103fabe lldb_private::IOHandlerEditline::Run()
/home/antipov/llvm/source/llvm/tools/lldb/source/Core/IOHandler.cpp:575:11
#57 0x00007f03710238f4 __gthread_mutex_lock(pthread_mutex_t*)
/usr/lib/gcc/x86_64-redhat-linux/10/../../../../include/c++/10/x86_64-redhat-linux/bits/gthr-default.h:748:7
#58 0x00007f03710238f4 __gthread_recursive_mutex_lock(pthread_mutex_t*)
/usr/lib/gcc/x86_64-redhat-linux/10/../../../../include/c++/10/x86_64-redhat-linux/bits/gthr-default.h:811:10
#59 0x00007f03710238f4 std::recursive_mutex::lock()
/usr/lib/gcc/x86_64-redhat-linux/10/../../../../include/c++/10/mutex:106:17
#60 0x00007f03710238f4
std::lock_guard<std::recursive_mutex>::lock_guard(std::recursive_mutex&)
/usr/lib/gcc/x86_64-redhat-linux/10/../../../../include/c++/10/bits/std_mutex.h:159:19
#61 0x00007f03710238f4 lldb_private::Debugger::RunIOHandlers()
/home/antipov/llvm/source/llvm/tools/lldb/source/Core/Debugger.cpp:863:45
#62 0x00007f03710f883d
lldb_private::CommandInterpreterRunOptions::DefaultToYes(lldb_private::LazyBool)
/home/antipov/llvm/source/llvm/tools/lldb/include/lldb/Interpreter/CommandInterpreter.h:201:5
#63 0x00007f03710f883d
lldb_private::CommandInterpreterRunOptions::GetAutoHandleEvents() const
/home/antipov/llvm/source/llvm/tools/lldb/include/lldb/Interpreter/CommandInterpreter.h:175:12
#64 0x00007f03710f883d
lldb_private::CommandInterpreter::RunCommandInterpreter(lldb_private::CommandInterpreterRunOptions&)
/home/antipov/llvm/source/llvm/tools/lldb/source/Interpreter/CommandInterpreter.cpp:3071:17
#65 0x00007f0370bcdf6f lldb::SBDebugger::RunCommandInterpreter(bool, bool)
/home/antipov/llvm/source/llvm/tools/lldb/source/API/SBDebugger.cpp:0:42
#66 0x0000000000406b16 reset_stdin_termios()
/home/antipov/llvm/source/llvm/tools/lldb/tools/driver/Driver.cpp:101:7
#67 0x0000000000406b16 Driver::MainLoop()
/home/antipov/llvm/source/llvm/tools/lldb/tools/driver/Driver.cpp:676:3
#68 0x00000000004083b0 main
/home/antipov/llvm/source/llvm/tools/lldb/tools/driver/Driver.cpp:921:26
#69 0x00007f0366aa3042 __libc_start_main (/lib64/libc.so.6+0x27042)
#70 0x00000000004040ee _start
(/home/antipov/.local/llvm-devel-12.0.0/bin/lldb+0x4040ee)
Aborted

-- 
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/20200914/3dfb0233/attachment-0001.html>


More information about the llvm-bugs mailing list