Description of problem: I'm trying to use clangd to work on VK-GL-CTS (https://github.com/KhronosGroup/VK-GL-CTS) using Visual Studio Code, in order not to depend so much on the proprietary C/C++ IntelliSense pluging from Microsoft. However, clangd crashes several times while trying to index the project and cannot index it properly. The crash looks similar to this reported issue: https://github.com/clangd/clangd/issues/265 In that thread, you can see a patch appearing to solve the issue is proposed here: https://github.com/clangd/clangd/issues/265#issuecomment-580173854 I have built clangd 9.0.1 from sources with and without that patch and, indeed, crashes happen without the fix and then stop with the fix applied when indexing VK-GL-CTS. Furthermore, a similar one-liner fix seems to have already landed on LLVM master: https://github.com/llvm/llvm-project/commit/ad7211df6f257e39da2e5a11b2456b4488f32a1e But it doesn't seem to be present in the 9.x branch: https://github.com/llvm/llvm-project/blob/release/9.x/clang/lib/AST/RawCommentList.cpp#L413 I would like to request applying a similar one-liner patch to the Fedora-shipped clangd 9.0.1 in Fedora 31. Version-Release number of selected component (if applicable): clang-tools-extra-9.0.1-2.fc31.x86_64 How reproducible: Always. Steps to Reproduce: 1. Build deqp-vk from VK-GL-CTS following these instructions: https://github.com/KhronosGroup/VK-GL-CTS/tree/3c12deb6000947c6a94809c99cd4ae68e1839262/external/vulkancts#linux-32-bit-debug (remembering to add -DCMAKE_EXPORT_COMPILE_COMMANDS=1 to the cmake call). 2. Symlink compile_commands.json in the root directory. 3. Try to index the project using clangd. Actual results: clangd crashes several times and is unable to index the project. Expected results: clangd indexes the project successfully. Additional info:
The patch didn't even land in llvm 10.0.0, so it's not even applied on rawhide. I've suggested it for 10.0.1 here https://bugs.llvm.org/show_bug.cgi?id=45615
(In reply to serge_sans_paille from comment #1) > The patch didn't even land in llvm 10.0.0, so it's not even applied on > rawhide. I've suggested it for 10.0.1 here > https://bugs.llvm.org/show_bug.cgi?id=45615 Excellent, thanks! Do you have an ETA for patched Fedora packages?
Well, we'll wait until the minor llvm10 release, so that's generally a matter of months after the major release, but this major release got delayed a lot, so I can't tell for sure.
That's disappointing to hear. Taking into account this is a harmless one-liner patch that fixes a known crash and was added upstream, wouldn't it make more sense to backport it to both Fedora 31 (shipping 9.0.1) and Fedora 32 in the mean time as a package patch? That way Fedora users can receive the fix now rather than having to wait for months.
After updating to Fedora 32 I have given another try to clangd and found this issue. A backport in the Fedora package until 10.0.1 would be indeed appreciated.
ok, I'll wait for it to be accepted to 10.0.1 and once it's OK, I'll backport the patch.
FWIW I have added the patch in https://copr.fedorainfracloud.org/coprs/reddwarf/personal/. I have started to use it in VSCode and no complains so far.
FWIW I have ended up also adding https://github.com/llvm/llvm-project/commit/9a5c448a31bacc08e73fcae4636094f9b6e2be6a to my copr because it's also a crash bug (https://github.com/clangd/clangd/issues/378).
Thanks for the packages and the COPR idea! I've built a COPR package with the patch for Fedora 31 so others can test it too: https://copr.fedorainfracloud.org/coprs/rg3/clang/
I had a similar issue with Fedora 32. It is great to see that issue has been identified and a fix for it is available. On the other hand it is a bit sad to hear that this could take months to be fixed. It makes clangd unusable for big projects. The probability that one header somewhere has an empty comment is actually fairly high. I resorted to compile clangd / LLVM 11 manually for now which is not so ideal either.
The fix has been accepted for 10.0.1, I'll bacport it now for rawhide and f32/f31
Available as clang-10.0.0-2.fc33.src.rpm
FEDORA-2020-f415dc8466 has been submitted as an update to Fedora 32. https://bodhi.fedoraproject.org/updates/FEDORA-2020-f415dc8466
FEDORA-2020-3a5df7ae7d has been submitted as an update to Fedora 31. https://bodhi.fedoraproject.org/updates/FEDORA-2020-3a5df7ae7d
FEDORA-2020-f415dc8466 has been pushed to the Fedora 32 testing repository. In short time you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-f415dc8466` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-f415dc8466 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
FEDORA-2020-3a5df7ae7d has been pushed to the Fedora 31 testing repository. In short time you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-3a5df7ae7d` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-3a5df7ae7d See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
Thanks a lot for both updates. I have tested both (Fedora 32 and 31) and they allow me to index VK-GL-CTS properly with no more crashes. I've left feedback in Bodhi.
FEDORA-2020-f415dc8466 has been pushed to the Fedora 32 stable repository. If problem still persists, please make note of it in this bug report.
FEDORA-2020-3a2812cd4d has been submitted as an update to Fedora 31. https://bodhi.fedoraproject.org/updates/FEDORA-2020-3a2812cd4d
@Riccardo, the f31 version was stalling, I resubmitted that update alongside another bugfix.
FEDORA-2020-3a2812cd4d has been pushed to the Fedora 31 testing repository. In short time you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-3a2812cd4d` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-3a2812cd4d See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
FEDORA-2020-3a2812cd4d has been pushed to the Fedora 31 stable repository. If problem still persists, please make note of it in this bug report.