-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
Adding a conformance apparently corrupts metadata cache? #62498
Comments
I'm still reproducing this in the hylo project, FWIW. |
I wasn't able to reproduce this locally, but from your screenshot it looks like you're somehow encountering infinite recursion. It just so happens that the MetadataCache code is what runs off the end of the stack and crashes. Seems that adding that conformance somehow makes part of this code call back into itself, where it doesn't do so otherwise. |
@mikeash, I'm really surprised it doesn't reproduce for you, as I've seen it on multiple machines. Did you try with the Hylo project, moving the |
I tried it with the |
You need to `git submodule update --init`. Note also, Val became Hylo, so when I asked did you try with Hylo, I just meant have you tried with the HEAD of main. BUT: I just got xcode 15.0.1 and it's not reproducing on this machine, so maybe the issue can be closed.
|
@mikeash Even with xcode 15.0.1, |
If the issue doesn't happen with 15.0.1 then I'd guess there's some change in method or function resolution which previously resulted in choosing a function that produced recursion, and now it doesn't. Hard to say if it was a bug fix or a just a change, but either way, it's good that it works now. |
I think you're misunderstanding my question. If I am going to put the conformance back where it belongs I need to use a swift-tools-version spec in Package.swift to declare that Xcode 15.0.1 is required, right? How can I do that if the Swift version didn't change between Xcode 15.0 and 15.0.1? |
Oh, I see. Does it break with 15 but work with 15.0.1? That would be really weird. I don’t think there were any changes to the compiler. |
Description
If I add a conformance to my project—one that isn't even used—I get a crash during testing.
Steps to reproduce
Check out the swift-conformance-crasher tag of the Val project.
swift test --filter testEmitter
. For me, this crashes (see attached screenshot).Now delete the conformance of
WideUInt
toBinaryInteger
and run the test again. For me, the test passes.Furthermore, I can add
to another module (e.g.
Compiler
) without incident.Of course this doesn't prove the bug is in the compiler/runtime, but it's highly suspicious.
Expected behavior
The presence of that conformance should have no effect.
Environment
Target: arm64-apple-macosx13.0
Build version 14B47b
The text was updated successfully, but these errors were encountered: