Issue 130280
Summary [clangd] "Assertion `LocalDeclID < LocalNumDecls' failed." when using clangd with `--experimental-modules-support`
Labels new issue
Assignees
Reporter jiixyj
    I'm trying out the new experimental module support of clangd with a ~25 KLOC large code base. On some files (~5 out of ~170), clangd crashes with an assertion failure in `clang/lib/Serialization/ASTReader.cpp`: "Assertion `LocalDeclID < LocalNumDecls' failed." With assertions disabled there are instead "random" crashes in the parser (I guess because of UB?).

The git hash is ff993f9a4c23cfaae54f2a2708bed23954b8d9c0 .

I haven't found a minimal, standalone reproducer yet, sadly. I have attached the output of `clangd --compile-commands-dir=. --experimental-modules-support --check=src/ldgr/core.cppm` and the backtrace in gdb.

Any ideas how to further debug this? I haven't found any pattern in the ~5 files that crash, although the crashes are reproducible.

[clangd-output.txt](https://github.com/user-attachments/files/19126557/clangd-output.txt)
[gdb-log.txt](https://github.com/user-attachments/files/19126556/gdb-log.txt)
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to