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-1889] Compiler Segmentation Fault with Generic typealias declared in separate module #44498
Comments
cc @lattner |
I suspect this is one of the classic "validate vs type check" problems that you enjoy fixing so much, @belkadan :-) |
This was fixed a while ago: commit c06fd1a Serialization: When deserializing a typealias, build its generic signature We were forgetting to do this, triggering crashes when using a |
I'm not sure about that. There are plenty of generic typealias issues that people have filed based on beta 2 and beta 3. |
This specific segfault is fixed, though, in beta 3. Do you have pointers to the other issues that were filed? |
Comment by Andy Ibanez (JIRA) Sorry for butting in, but this specific bug is happening to me in Xcode 8, Beta 3. |
Andy, is this with multiple modules or multiple files in one module? |
Also I just noticed we still crash with -g. Sorry about that. I'll re-open this bug. |
Comment by Andy Ibanez (JIRA) It happens to me with multiple files in one module. To be more specific, I'm building a Framework project, and I declared the generic typealias in one file, and attempted to use it in another file as a function parameter. |
Comment by Andy Ibanez (JIRA) I'm the one who opened the duplicate issue that just got closed (SR-2169). I don't know how these two bugs related to each other, but I provided a small sample project on mine that reproduces the issue. Hope that helps. |
I have a fix, going to push it now. |
Comment by Andy Ibanez (JIRA) Slava, unfortunately, I seem to still have this problem in the version of Swift included in Xcode 8, Beta 4. I will be happy to submit my entire project if needed and point it what generic typealiases are having the issue. In the meantime, the following is the stack trace. I'm not entirely sure of how helpful it is though:
To add a little bit of context my generic typealias is something like this: Anilist.swift
Anilist+API+UserEndpoint.swift
|
Hi Andy, sorry but the fix did not make it into beta 4. It will appear in a later Xcode 8 beta, though. If you want, you can try a recent development snapshot. |
Comment by Andy Ibanez (JIRA) Heya, sorry for bothering you again with this. I had reported the bug on bugreporter.apple.com as well and I received a notice telling me to see if the bug was fixed on Xcode 8, Beta 6. I'm not sure if the fix made it to that version, but the bug is still happening to me. I will happily provide my whole project if you guys need it to debug this. |
I can't reproduce this. What does 'xcrun swiftc -version' report?
If you don't mind, can you attach your project to the radar? |
Comment by Andy Ibanez (JIRA) Apple Swift version 3.0 (swiftlang-800.0.43.6 clang-800.0.38) I will go ahead and attach my project to the radar (27537050) |
Comment by Andy Ibanez (JIRA) Alright, the project has been attached to the radar ID. Please let me know if you need anything else. |
Thanks Andy. I was able to reproduce the crash. It does look like a new issue that was uncovered when the others were fixed. I'll have a fix shortly. |
Attachment: Download
Additional Detail from JIRA
md5: 209a915142e6cadfc3c21ed69f25fde4
is duplicated by:
relates to:
Issue Description:
I've declared a Result type and a generic typealias for the Result type in one module as such:
Then, on attempting to use the GenericResult typealias from a separate module like so:
the compiler will crash with the following stack trace:
I've attached a very simple Xcode project to show this issue.
The text was updated successfully, but these errors were encountered: