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-16008] Crash in NativeSet.subtracting in Swift 5.6 #58269
Comments
Unexpected! That jump to NULL happens on a suspiciously early offset; I wonder if this this turns out to be some sort of undiagnosed availability issue. (If so, I'm surprised it didn't show up in our back deployment tests.) It's too early to tell if the fix will require an SDK update, but if you're urgently blocked on this, a quick-and-dirty workaround would be to define something like this in affected modules:
(This is considerably slower than the actual implementation, but it will be most likely free of this issue.) |
@swift-ci create |
Oh, interesting. I haven't seen a crash yet from iOS 15.4, but I've seen a lot from OS versions prior to that. (Particularly iOS 15.3.1). That could just be indicative that we don't have many users on 15.4 yet, though. |
Erik's fix is up: #41954 It did turn out to be an availability issue, caused by a misfiring optimization in the compiler. |
Comment by Spencer Transier (JIRA) @eeckstein Do you know if the fix for this bug was included in Xcode 13.3.1? |
It looks like 13.3.1 has the same version of Swift as 13.3. But there has been a 5.6.1 tagged, so we can be hopeful that there'll be a 13.3.2… (Signal also ran into this bug, generating many crashes a day.) |
Attachment: Download
Environment
Swift 5.6 (Xcode 13.3 RC)
Additional Detail from JIRA
md5: 674f6e7f2c1d562dd01cd5928d2907d0
Issue Description:
We've recently upgraded to Swift 5.6 (with Xcode 13.3), and we're seeing reports of crashes in
NativeSet.subtracting
. We haven't changed any of this code in months; the only change is that we're now building with Swift 5.6.I see that there were some changes to NativeSet.subtracting in Swift 5.6, so I'm wondering if our crashes are related to these changes.
Our code looks like this:
Full crash logs attached below, but the relevant part looks like this:
swift-demangle reports those frames as this:
I have not been able to reproduce this crash locally yet, but we've got a bunch of reports from 8 beta testers in just a few hours, so it seems like it's a reasonably common thing to hit, and not likely dependent on having very particularly crafted set.
The text was updated successfully, but these errors were encountered: