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-9071] Segfault using key path with superclass property #51572
Comments
Hm. @rjmccall, any ideas? |
Maybe we're not fully validating the layout-pertinent parts of a class when we just see a key path component? Or there's something about default arguments? |
Comment by Helge Heß (JIRA) JFYI: I updated my codebase to 4.2, still getting the crashes. I'll try to remove key paths and see whether that fixes it. |
Comment by Helge Heß (JIRA) OK, I managed to pin it down a little further. The crash happens if the changeset.update(storage: &infos,
id: \SomeClass.id, inherits the `id` from a superclass, like: class Base {
let id : MyIDObject
}
class SomeClass : Base {
let blub : String
} It stops crashing if I remove the class hierarchy like this: class SomeClass {
let id : MyIDObject
let blub : String
} |
Perfect!
@swift-ci create |
@jckarter says this is fixed in Swift 5. If you get the chance, can you test with a toolchain from https://swift.org/download ? |
helge (JIRA User), Could you verify if the problem is fixed and if so move the JIRA to "Closed"? Thanks! |
Environment
Xcode Version 10.0 (10A255)
macOS 10.13.6 (17G65)
MacPro
Additional Detail from JIRA
md5: e62011b5c601dbaf66377e6cf8b43723
Issue Description:
I can't fully reproduce this, it happens when compiling a larger Swift project in Xcode. Sometimes it goes away when recompiling, maybe build ordering has something to do with it. This is with Xcode 10, source is in Swift 4.0 mode.
Unfortunately I can't provide the source producing the issue, but the code invoked involves ref-args, keypathes, classes and generics.
It looks a little like this on the calling site:
and like this on the called site:
The text was updated successfully, but these errors were encountered: