-
Notifications
You must be signed in to change notification settings - Fork 10
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
try/catch/finally crashes clang #7
Comments
Thanks for the report. Is this with Clang 13.0.0 installed from the LLVM website? @davidchisnall could you take a look at this? |
I installed via chocolatey.
|
Can you provide a reduced test case? To be able to debug this I need a preprocessed source file and the minimal compiler command to reproduce it. |
OK, these are the files generated by clang crash.zip the minimal clang command would be |
I am not actively using GNUstep or anything Objective-C related, and have almost no time to work on it at the moment. If there is a reduced test case, then I can take a look when I next have some spare time, but please try to provide something that doesn't include megabytes of headers. |
@levinli303 can you try building this without GNUstep, maybe something like this: clang-cl -fobjc-runtime="gnustep-2.0" -Xclang -fexceptions -Xclang -fobjc-exceptions /MDd /c test.m You might have to replace "NSException" with "id" in the code. |
ok I removed import of Foundation and used id in place of NSException* crash.zip |
Minimal test case:
|
It looks as if this is a bug in the Windows EH code for Objective-C with all runtimes. Clang is trying to pop something off the EH stack and expecting a catch but getting a cleanup. It crashes in the same place with any |
thanks I will file a bug to llvm. |
So I think this only happens when @levinli303 would be great if you could share the link to the LLVM bug here once you have filed it. |
@triplef you are right. if there is no the filed bug is here: https://bugs.llvm.org/show_bug.cgi?id=52557 |
Thanks! Could you maybe clarify in the bug that this specifically happens with
@davidchisnall is there a way to bring this to the attention of anyone who might be familiar with the relevant code? |
@triplef I think LLVM is migrating the bug system from bugzilla to GitHub so I can't edit either. let's wait until the migration finishes. (Nov. 29 as it suggests.) |
I remembered this comment from last year that I think is talking about the same issue:
@DHowett-MSFT any chance you could take a look at this? https://bugs.llvm.org/show_bug.cgi?id=52557 |
Interesting. This reminds me of LLVM-44483 "[Windows] evaluating a variable from an outer scope in a @finally inside a block causes an internal compiler error" as well. There's significant issues in Unfortunately, I haven't had my compiler engineering hat on for a while now and can only invest at the "hobby" level |
FYI, the issue has been transferred to GitHub llvm/llvm-project#51899 |
@DHowett if you could take a look even at the "hobby" level that would certainly be appreciated! 🙏 (Another user ran into this issue with an existing large code base that is re-throwing exceptions from |
Known issues: #7 llvm/llvm-project#43828 llvm/llvm-project#51899 llvm/llvm-project#54556 llvm/llvm-project#56952 gnustep/libobjc2#222 Also removed copy about GNUstep test failures, as they have been fixed.
Building this file
with 09/12 toolchain
clang crashes with
The text was updated successfully, but these errors were encountered: