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
[SR-6216] Compiler crashes during Release build (regression from 8.3 to 9.x) #48768
Comments
Comment by Raphael (JIRA) I tried to isolate the error by extracting the component the stack dump pointed at, but was unsuccessful (no segfault observed). If anybody has an idea which optimization I have to trigger and how, please advise. |
Comment by Raphael (JIRA) I note that the compiler (with default settings) runs significantly longer (before it segfaults) compared to successful Debug builds; apparently it encounters something in our code that's hard to optimize. Without WMO, the compiler takes a long, long time, but eventually finishes successfully. Apparently it encounters something in our code that's hard to optimize. Fun fact: after a successful built without WMO, builds with WMO finish successfully as well! Even after a clean and clean build folder, it still builds. What the ... ? Was the problem caused by an unclean build folder? Due to other regressions in 9.x, I switch between versions of XCode (8.3, 9.0, 9.1-beta), can they interfere with each other? I'm also regularly switching Git branches. |
@eeckstein, any advice? We're supposed to handle switching between Xcode versions without cleaning your build folder, but since it's such a rare configuration and people usually immediately try cleaning when they see a problem it's possible a bug snuck in and we wouldn't know about it. |
As a first step I propose that you compile with the latest swift 4.0 development snapshot (download from https://swift.org/download/#snapshots). This will probably give us a more descriptive error, because the snapshots are built with assertions. |
Comment by Raphael (JIRA) @belkadan Well, we have to release with 8.3 because 9.0 introduced regressions in And all that despite me working with AppCode as much as possible. @eeckstein Thanks for the pointer. Unfortunately, I can't reproduce the issue with neither the 9.1 nor the snapshot toolchain right now. If I encounter segfaults again, I'll try to repro with the latest snapshot before reporting. |
Sorry, I don't mean having multiple Xcodes is rare; I mean switching back and forth in the same project is rare. But maybe that impression is based on older updates, which were much more likely to be source-breaking. We'd still like to fix any of these issues if we can track them down. (Glad to hear that we may have fixed this particular one, whatever it is, in 9.1.) |
We fixed a bug in exactly this component. So most likely this is the same issue |
Environment
macOS 10.13 (17A405)
XCode 9.0; XCode 9.1 beta (9B46)
Additional Detail from JIRA
md5: 82209094ec4c5236c5e0ad48e53ac0e5
Issue Description:
Our project, which builds just fine with XCode 8.3 in both configurations, and with XCode 9.x in Debug configuration, causes the compiler under XCode 9.x to segfault on Release builds.
I can't share the code, of course, and don't even know where to start looking for narrowing it down. Please advise.
Here's the stack trace the 9.1 beta produces:
Needless to say, this is a showstopper for us.
The text was updated successfully, but these errors were encountered: