Skip to content
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-11450] Compiler crashes with 'Illegal instruction: 4' when running MergeSwiftModule #53851

Open
swift-ci opened this issue Sep 11, 2019 · 3 comments
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself crash Bug: A crash, i.e., an abnormal termination of software regression swift 5.1

Comments

@swift-ci
Copy link
Collaborator

Previous ID SR-11450
Radar rdar://problem/55263077
Original Reporter anlaital (JIRA User)
Type Bug

Attachment: Download

Environment

Xcode 11 GM

Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug, 5.1Regression, CompilerCrash
Assignee None
Priority Medium

md5: 3eb76226bda89877306cdf3aee38468a

Issue Description:

This is a regression issue in Xcode 11 and caused by the compiler going into an infinite loop.

You can find the minimalistic repro case as an attachment. Compiling it will result in a crash with Xcode 11 GM.

@belkadan
Copy link
Contributor

Thank you!

@swift-ci create

@typesanitizer
Copy link

Confirming that I'm able to reproduce the issue, including on master 656fe89 (Mon Sep 9). (Note to anyone else trying: use the .xcworkspace, not the .xcodeproj, so that the Pods.xcodeproj also gets compiled.)

@belkadan
Copy link
Contributor

Looks like this is due to the circular dependency between these two types:

class FormPushCell: Cell<FormPushRow.FormPushRowObject>, CellType { }
final class FormPushRow: Row<FormPushCell>, RowType { … }

That code should be legal in Swift, but the serialization logic is trying to make sure that all of the types each class depends on can be deserialized before deserializing the class itself.

anlaital (JIRA User), you can work around this by moving FormPushRow.FormPushRowObject out to being a top-level struct with a typealias inside FormPushRow.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@AnthonyLatsis AnthonyLatsis added the crash Bug: A crash, i.e., an abnormal termination of software label Dec 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself crash Bug: A crash, i.e., an abnormal termination of software regression swift 5.1
Projects
None yet
Development

No branches or pull requests

4 participants