-
Notifications
You must be signed in to change notification settings - Fork 163
Use clang4 by default, add setting to opt into clang5 until clang 5 works on Chrome #93
Comments
any idea why it doesnt work? |
Nope, completion works, but indexing fails for some reason. I'll have to do some debugging. I'm guessing there is a fatal error somewhere in clang. |
and chrome compiles with clang 5? |
Yea, Chrome compiles with near-head clang. |
I've had some crashes during indexing with clang5 too (non-chrome code base) - everything rock solid on clang4. If you want some stack traces, let me know and I can add them here. |
Yea, that'd be great |
Not sure how useful this is;
This is from the core file dumped by ./app I looked in the Chrome console and got a I'm using my system clang 5.0.0 RELEASE on Gentoo linux. If there's some setting I need to set to get more useful information, please let me know & I'll keep trying. So far today with Clang 5 - I've had about 15 of these where with Clang 4 it's never yet crashed. |
Ooh, based on that stack trace it looks like this is caused by the same issue as #43 (but that stack is originating from ClangCompleteManager, and iirc the crashes are from the indexer thread) |
This may expose a different race condition in libclang when cquery calls When In @elpixo 's comment we can only see the libclang thread, not the cquery "indexer" thread spawning the libclang thread. New thread inherits If the problem is easy to reproduce, you may |
Do you mean in 473b827 , some indexes (
|
Yep - but I don't recall seeing deadlocks either way. I'm planning on testing clang --emit-ast via command line tonight or tomorrow. |
I don't think we will ever switch to clang 5 by default, the indexing API seems to be buggy. clang trunk works though, so when clang 6 becomes stable we can switch to that. Got this backtrace when indexing this file.
|
Reverse engineering is fun. tools/clang/tools/libclang/CXIndexDataConsumer.cpp:935 bool CXIndexDataConsumer::handleReference(const NamedDecl *D, SourceLocation Loc,
CXCursor Cursor,
const NamedDecl *Parent,
const DeclContext *DC,
const Expr *E,
CXIdxEntityRefKind Kind) {
935: getContainerInfo(DC, Container); void CXIndexDataConsumer::getContainerInfo(const DeclContext *DC,
ContainerInfo &ContInfo) {
ContInfo.cursor = getCursor(cast<Decl>(DC));
ContInfo.DC = DC;
ContInfo.IndexCtx = this;
}
|
It would be helpful if you could a compile an llvm with debug info Here is the command I use to build llvm. # https://llvm.org/docs/GettingStarted.html#git-mirror
% git clone https://git.llvm.org/git/llvm.git
% cd llvm/tools
% git clone https://git.llvm.org/git/clang.git
# cd back to llvm/
% mkdir build; cd build
% cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -G Ninja -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang -DCMAKE_ASM_COMPILER=clang -DCMAKE_EXE_LINKER_FLAGS=-fuse-ld=gold -DLLVM_USE_SPLIT_DWARF=On -DBUILD_SHARED_LIBS=ON -DLLVM_OPTIMIZED_TABLEGEN=On -DLLVM_ENABLE_ASSERTIONS=On -DLLVM_ENABLE_RTTI=On ..
% ninja
# lib/ is what we want |
|
No description provided.
The text was updated successfully, but these errors were encountered: