[clangd-dev] Anyone know how to fix the clangd shared libraries crash?
Sam McCall via clangd-dev
clangd-dev at lists.llvm.org
Sat Feb 2 01:07:04 PST 2019
(Ilya and Roman, I'm hoping this is an obvious/dumb question you'll just
know the answer to - I'd like shared libs to work well for my laptop when
I'm sitting on a train like today, but I have no idea how they work...)
With cmake -DBUILD_SHARED_LIBS=On, everything builds ok, but I get crashes
in index tests (both lit and unittests, so both binaries affected).
I'm using release clang+lld 7 on debian. We have no bots at all for shared
ninja ClangdTests && tools/clang/tools/extra/unittests/clangd/ClangdTests
Segfaults with the first useful frame:
#5 0x00007fad94321f4c (anonymous
I've narrowed it down to clang/index/IndexAction.cpp:185: the
make_shared<SymbolCollector> call returns nullptr. (I can even print the
pointer, it's null!)
Following it in a debugger, shared_ptr just skips over the constructor call.
I figure it must be a deps issue somehow, but I'm not sure how to work it
out. The callsite and SymbolCollector are defined in the same library
(clangDaemon). I've tried adding dependencies at random (e.g. adding the
whole dependency list of clangDaemon, clangIndex, and ClangdTests to the
other targets) but it doesn't make a difference.
Anyone have ideas?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the clangd-dev