Skip to content

Crash while indexing #157

@gicmo

Description

@gicmo
ccls --version
ccls version 7.0.0 (Fedora 7.0.0-2.fc29)

Built using system clang/llvm (llvm-7.0.0-2.fc29.src.rpm); configured via cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -BRelWithDebInfo -DCMAKE_INSTALL_PREFIX=/usr -DSYSTEM_CLANG=On -DUSE_SHARED_LLVM=On -GNinja ..

I get a crash when indexing bolt, reproducible on the commandline via cls -index=/home/gicmo/Code/src/bolt:

0  0x00007ffff2bfa53f in raise () from /lib64/libc.so.6
1  0x00007ffff2be4895 in abort () from /lib64/libc.so.6
2  0x00007ffff684b3c8 in std::__replacement_assert (__file=__file@entry=0x7ffff6936d30 "/usr/include/c++/8/bits/shared_ptr_base.h", __line=__line@entry=983, __function=__function@entry=0x7ffff6971b80 <std::__shared_ptr_access<llvm::sys::fs::detail::DirIterState, (__gnu_cxx::_Lock_policy)2, false, false>::operator*() const::__PRETTY_FUNCTION__> "std::__shared_ptr_access<_Tp, _Lp, <anonymous>, <anonymous> >::element_type& std::__shared_ptr_access<_Tp, _Lp, <anonymous>, <anonymous> >::operator*() const [with _Tp = llvm::sys::fs::detail::DirIter"..., __condition=__condition@entry=0x7ffff6936d15 "_M_get() != nullptr") at /usr/include/c++/8/x86_64-redhat-linux/bits/c++config.h:2391
3  0x00007ffff68c4b2d in std::__shared_ptr_access<llvm::sys::fs::detail::DirIterState, (__gnu_cxx::_Lock_policy)2, false, false>::operator* (this=0x5c6c20) at /usr/include/llvm/ADT/StringRef.h:90
4  llvm::sys::fs::directory_iterator::directory_iterator (follow_symlinks=true, ec=..., path=..., this=0x5c6c20) at /usr/include/llvm/Support/FileSystem.h:1163
5  (anonymous namespace)::RealFSDirIter::RealFSDirIter (EC=..., Path=..., this=0x5c6bc0) at /usr/src/debug/clang-7.0.0-2.fc29.x86_64/lib/Basic/VirtualFileSystem.cpp:302
6  __gnu_cxx::new_allocator<(anonymous namespace)::RealFSDirIter>::construct<(anonymous namespace)::RealFSDirIter, llvm::Twine const&, std::error_code&> (this=<optimized out>, __p=0x5c6bc0) at /usr/include/c++/8/ext/new_allocator.h:136
7  std::allocator_traits<std::allocator<(anonymous namespace)::RealFSDirIter> >::construct<(anonymous namespace)::RealFSDirIter, llvm::Twine const&, std::error_code&> (__a=..., __p=0x5c6bc0) at /usr/include/c++/8/bits/alloc_traits.h:475
8  std::_Sp_counted_ptr_inplace<(anonymous namespace)::RealFSDirIter, std::allocator<(anonymous namespace)::RealFSDirIter>, (__gnu_cxx::_Lock_policy)2>::_Sp_counted_ptr_inplace<llvm::Twine const&, std::error_code&> (__a=..., this=0x5c6bb0) at /usr/include/c++/8/bits/shared_ptr_base.h:543
9  std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<(anonymous namespace)::RealFSDirIter, std::allocator<(anonymous namespace)::RealFSDirIter>, llvm::Twine const&, std::error_code&> (__a=..., this=<optimized out>) at /usr/include/c++/8/bits/shared_ptr_base.h:656
10 std::__shared_ptr<(anonymous namespace)::RealFSDirIter, (__gnu_cxx::_Lock_policy)2>::__shared_ptr<std::allocator<(anonymous namespace)::RealFSDirIter>, llvm::Twine const&, std::error_code&> (__a=..., this=<optimized out>, __tag=...) at /usr/include/c++/8/bits/shared_ptr_base.h:1322
11 std::shared_ptr<(anonymous namespace)::RealFSDirIter>::shared_ptr<std::allocator<(anonymous namespace)::RealFSDirIter>, llvm::Twine const&, std::error_code&> (__a=..., this=<optimized out>, __tag=...) at /usr/include/c++/8/bits/shared_ptr.h:360
12 std::allocate_shared<(anonymous namespace)::RealFSDirIter, std::allocator<(anonymous namespace)::RealFSDirIter>, llvm::Twine const&, std::error_code&> (__a=...) at /usr/include/c++/8/bits/shared_ptr.h:707
13 std::make_shared<(anonymous namespace)::RealFSDirIter, llvm::Twine const&, std::error_code&> () at /usr/include/c++/8/bits/shared_ptr.h:723
14 (anonymous namespace)::RealFileSystem::dir_begin (this=this@entry=0x608a40, Dir=..., EC=...) at /usr/src/debug/clang-7.0.0-2.fc29.x86_64/lib/Basic/VirtualFileSystem.cpp:332
15 0x00007ffff6b4dcaa in clang::driver::toolchains::Generic_GCC::GCCInstallationDetector::ScanLibDirForGCCTriple (this=0x61ae90, TargetTriple=..., Args=..., LibDir="/../lib64", CandidateTriple=..., NeedsBiarchSuffix=false) at /usr/include/llvm/ADT/Twine.h:516
16 0x00007ffff6b4fd87 in clang::driver::toolchains::Generic_GCC::GCCInstallationDetector::init (this=this@entry=0x61ae90, TargetTriple=..., Args=..., ExtraTripleAliases=...) at /usr/include/c++/8/bits/basic_string.h:2293
17 0x00007ffff6b60400 in clang::driver::toolchains::Linux::Linux (this=0x61a950, D=..., Triple=..., Args=...) at /usr/include/llvm/ADT/ArrayRef.h:64
18 0x00007ffff6aa3bb0 in llvm::make_unique<clang::driver::toolchains::Linux, clang::driver::Driver const&, llvm::Triple const&, llvm::opt::ArgList const&> () at /usr/include/llvm/ADT/STLExtras.h:1069
19 clang::driver::Driver::getToolChain (this=0x7fffffffb9d0, Args=..., Target=...) at /usr/src/debug/clang-7.0.0-2.fc29.x86_64/lib/Driver/Driver.cpp:4327
20 0x00007ffff6ab2586 in clang::driver::Driver::BuildCompilation (this=this@entry=0x7fffffffb9d0, ArgList=...) at /usr/include/c++/8/bits/unique_ptr.h:342
21 0x0000000000496740 in ccls::(anonymous namespace)::ProjectProcessor::Process (this=0x7fffffffc510, entry=...) at /usr/include/c++/8/bits/stl_vector.h:1059
22 0x000000000049a1ca in ccls::(anonymous namespace)::LoadEntriesFromDirectory (opt_compdb_dir=..., project=0x7fffffffc570) at ../src/project.cc:370
23 ccls::Project::Load (this=0x7fffffffd180, root="/home/gicmo/Code/src/bolt/") at ../src/project.cc:401
24 0x000000000050e1f0 in ccls::Initialize (m=0x7fffffffd2a0, param=..., reply=...) at ../src/messages/initialize.cc:324
25 0x00000000005105fa in ccls::StandaloneInitialize (handler=..., root="/home/gicmo/Code/src/bolt") at ../src/messages/initialize.cc:360
26 0x000000000048926c in ccls::pipeline::Standalone (root="/home/gicmo/Code/src/bolt") at ../src/pipeline.cc:571
27 0x0000000000455b20 in main (argc=<optimized out>, argv=<optimized out>) at /usr/include/c++/8/bits/basic_string.h:252

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions