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-7354] Swift 4.1 Regression: EXC_BAD_ACCESS for Optimized Builds in Xcode 9.3 #49902
Comments
Comment by Fabian Ehrentraud (JIRA) it's a very strange crash, e.g. removing the |
Very strange. Thanks, Fabian! @swift-ci create |
Looking at this. |
Comment by Fabian Ehrentraud (JIRA) @gottesmm any news on this? it would be helpful for us if after analyzing, you could give an exact description under which circumstances the bug happens, so we can analyze the rest of our codebase for this pattern. currently we're afraid to update as it's hard to test all the special cases in our app. |
We have already triaged the issue and have a fix: |
Comment by Fabian Ehrentraud (JIRA) @gottesmm awesome, thanks for the fast fix! @gottesmm @belkadan Do you consider the bug bad enough to warrant an Xcode bugfix release? |
This has to do with the interaction between passes. There's nothing really unusual about the Swift code that triggers it. It should be fixed at the next possible opportunity. |
We can't ever talk about whether there'll be an Xcode bugfix release, or whether particular fixes would make it into any such release. This bug is pretty bad, especially in that you can't tell whether you're going to hit it beforehand, but every bug without a workaround is blocking somebody. |
[[master] https://github.com/apple/swift/pull/15840\|#15840] [4.2] #15876 |
Comment by Fabian Ehrentraud (JIRA) @belkadan thank you. too bad that no fixing xcode release seems in sight. we rolled back to xcode 9.2. |
Since the beta is out now I can say that this should be in Xcode 9.4b2. |
Comment by Fabian Ehrentraud (JIRA) @belkadan Xcode 9.4 just was released, but this bugfix is not mentioned in the release notes. Is it included? |
Yes, it is! |
Comment by Fabian Ehrentraud (JIRA) Awesome, thank you! |
Environment
Xcode 9.3 + iPhone X Simulator 11.3, or iPhone 6 Device 11.3
Additional Detail from JIRA
md5: 01fbdfe890b85cc4dcce92b1c7fe221d
Issue Description:
Since updating to Xcode 9.3 our project crashes on launch for optimized builds. It happens both on device and simulator, but not necessarily in the same locations. It worked fine with the previous Xcode. It happens for all builds with
-O
or-Osize
optimizations, independent of WMO de/activated, and independent of Swift 3 / Swift 4 mode.Changing arbitrary things in the method makes it run without crash. Even putting it into a different file might make it not crash anymore.
Example repro code:
Example project for convenience: https://github.com/fabb/swift_4_1_crash
The text was updated successfully, but these errors were encountered: