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-6522] Compiler crash in Debug depending on order of files in PBXSourcesBuildPhase #49072
Comments
Please let me know if you can reproduce this, since I will be able to relax a bit knowing so : ) |
cc @DougGregor @slavapestov @huonw (I have a feeling that this is related to recursive constraints on associated types.) |
@swift-ci create |
The issue persists in Development Snapshot 2017-12-03. |
Perhaps I should mention that when I try to compile the source files (of the attached project) from the command line, non-incrementally, it only works without -g, ie I can get it to compile (from the command line, using a single swiftc command) Seems strange that it can be successfully compiled from within Xcode in Debug (with -g and without -wmo, although incrementally and provided the source files are listed in the "magic" order in project.pbxproj as described in the bug-report) but not using a simple swiftc command like I have tried to see if the magic reordering of the source files would help here too but it crashes anyway. |
Crashes during SIL deserialization in the merge-modules phase, so it may not be related to recursive constraints after all. (Jens, a reminder that |
…and yes, managed to reproduce this with a near-master compiler. |
My feeling that this might be related to recursive constraints on associated types is based on the following part of the crash message:
The VectorIndex protocol has associated types that are constrained to conform to Vector and the Index-type of those Vectors must be Self. I have reported other bugs related to this before so I figured it might be related. Also see: (Regarding @inline(__always), do you mean not supported as in not future-proof? I "had to" use it because it seems to be the only way to let the compiler optimize some code (not included here) that was otherwise too slow, related conversation here: https://lists.swift.org/pipermail/swift-users/Week-of-Mon-20171030/006530.html and optimizer-issue described in more detailed here: https://bugs.swift.org/browse/SR-6254 (open)) |
I mean, I responded to you there with
I didn't explicitly mention crashing the compiler, but that too. Still, thanks for helping us track down the issues with it. There's no other way to get it to a state where we do want to support something like it. |
Yes, and just to be clear: The presence of the two @inline(__always) in the attached source code (Table.swift) is AFAICS not relevant for this issue, ie they can be removed and nothing changes, the compiler will still crash in Debug, unless the source files are "magically" ordered in project.pbxproj as mentioned in the report. I could and should have removed the @inline(__always) to avoid confusion when using the code to demonstrate this issue. |
Hm, true. Surprising, then, that we're getting crashes in SIL deserialization. What are we deserializing? (clearly we're missing a PrettyStackTrace entry here—the struct that puts those "While…" lines in the output) |
Another possible piece of the puzzle: It seems like it has something to do with the stuff in TableResampling.swift (and its connections to Vector.swift, VectorIndex.swift, and StandardVectorTypes.swift, judging by the crash message and previous encounters with similar compiler issues while working on this project):
And this line in the crash message:
must be talking about the following from TableResampling.swift:
|
Fix is here: #13454 |
Attachment: Download
Environment
Xcode Version 9.1 (9B55)
Swift Development Snapshot 2017-11-28 (a)
Additional Detail from JIRA
md5: f1bd1e78ffb71eaad78a87030d123832
Issue Description:
The following is from the README in the attached Xcode-project:
The text was updated successfully, but these errors were encountered: