-
Notifications
You must be signed in to change notification settings - Fork 12.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Crash: clangd CXXNameMangler::mangleExpression while parsing lambda expression #98572
Comments
@llvm/issue-subscribers-clangd Author: None (bluecorvetteai)
I pulled the latest from llvm-project `main` in order to resolve issues fixed in https://github.com//issues/94614 and https://github.com//issues/98428.
I built clangd, version:
No longer see get a crash in Am I reaching too far? Am I just looking for trouble by pulling from Thanks [ERROR][2024-07-11 17:50:41] .../vim/lsp/rpc.lua:770 "rpc" "/usr/bin/clangd" "stderr" "unexpected statement kind" UNREACHABLE executed at /home/kevin/os/llvm-project/clang/lib/AST/ItaniumMangle.cpp:4729! Stack dump: [ERROR][2024-07-11 17:50:41] .../vim/lsp/rpc.lua:770 "rpc" "/usr/bin/clangd" "stderr" " |
@bluecorvetteai: Does standalone Clang crash? |
@EugeneZelenko No, it builds. |
It's definitely useful to get reports of crashes with trunk. If you're able to prepare a test case that reproduces the crash, that would be very helpful for further investigation. |
I figured an example would be helpful. Kind of under the gun at the moment, but I'll spend some time on it, I would like to help. |
The code that prompted this bug report was pretty complicated. However, after commenting it out, I found another that was very simple. A very simple lambda being passed to Coming up with an example doesn't seem as daunting now. Give me a bit to put a project together to see if I can't get some meat to chew on. |
@HighCommander4 I keep coming up empty when trying to reproduce this. It isn't all lambdas that trigger the crash. It can parse a number of them before it finally crashes. The offending lambda appears it has to be part of a very large function with other lambdas before it (this lambda is pretty simple) in order to trigger a crash. I've included statement that is triggering in our regular code below. If I comment out the call to This appears to be the proverbial straw that breaks the camel's back. If you have any ideas, I'm all ears. Otherwise, I'll keep thinking about this and keep trying.
|
The approach I usually take to reduce crashing testcases is to start with the full translation unit, and progressively remove things (statements, declarations, includes) that can be removed while preserving the crashing behaviour. You might find it convenient to trigger the crash on the command line using |
Perfect, I did not know about |
@bluecorvetteai Is everything working fine with the trunk right now, or has there been any progress with the reduced code? thanks |
I pulled the latest from llvm-project
main
in order to resolve issues fixed in #94614 and #98428.I built clangd, version:
No longer see get a crash in
clang::TemplateArgument::getNonTypeTemplateArgumentType()
, however, I am getting a crash in mangleExpression (or there abouts).Am I reaching too far? Am I just looking for trouble by pulling from
main
or is this valuable feedback for the team?Thanks
Kevin
The text was updated successfully, but these errors were encountered: