-
Notifications
You must be signed in to change notification settings - Fork 120
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 under clang14 in release mode on windows #230
Comments
This is probably related to this bug: For the time being I’d recommend sticking with Clang 13. You can use one of the official downloads from the LLVM website instead of using the Visual Studio one. |
looks like it. |
@levinli303 Can you run the test suite for libobjc2 and check if you see these failing:
I am looking into these failures right now. Might be good to know if this is one and the same issue. |
@weliveindetail do you still need me to run these tests? I'm not sure how to do so, if you can provide some commands to allow me to run the tests I can do it in the coming few days. |
Yes that might be a good test. Assuming you use CMake and Ninja to build libobjc2 and that you installed Clang from one of the releases you should be able to build a release version like this:
Then copy the
Up until Clang 15.x the above mentioned tests should fail. I landed a fix in mainline yesterday. If you build Clang from the latest sources yourself (or wait for release 16.x) they should pass now. |
I’ve added a section about known compiler issues in the readme: |
@weliveindetail
with the |
@levinli303 Did you run this from your Visual Studio command line? |
@weliveindetail the test suite are all passing for this clang version (I need to set CMAKE_C_COMPILER to clang instead of clang-cl, otherwise it will complain import is not a MSVC feature)
|
Is this now fixed? |
based on https://github.com/gnustep/tools-windows-msvc#status-and-known-issues, it is fixed in clang 16. |
Yes this was fixed in Clang 16. You can get the RC build here if you want to give it a try to confirm: In the discussions around this fix there were some open questions around whether the GNUstep runtime needs/uses markers for ObjC ARC autorelease optimization. @davidchisnall could you still chime in on that? From llvm/llvm-project#56952 (comment):
From https://reviews.llvm.org/D134441#3810388:
|
After updating Visual Studio to 17.3 (which updated clang to clang 14), I'm noticing a crash in some methods when built with clang 14 in release mode on Windows. This only happens with clang 14 + Release. Does not happen with clang 13, or in debug mode. Using example project in https://github.com/gnustep/tools-windows-msvc
One example is to use this method
[NSProgress progressWithTotalUnitCount:10];
This crash does not happen if I write
[[NSProgress alloc] initWithParent:nil userInfo:nil];
The text was updated successfully, but these errors were encountered: