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-10583] Segmentation fault: 11 starting from Swift 5 #52983

Closed
swift-ci opened this issue Apr 30, 2019 · 1 comment
Closed

[SR-10583] Segmentation fault: 11 starting from Swift 5 #52983

swift-ci opened this issue Apr 30, 2019 · 1 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.0

Comments

@swift-ci
Copy link
Collaborator

Previous ID SR-10583
Radar rdar://problem/50336667
Original Reporter ChrisMyrants (JIRA User)
Type Bug
Status Resolved
Resolution Duplicate

Attachment: Download

Environment

You can test this error building our project at its version 0.17.0 on Xcode 10.2, Swift 5.

We also isolated the problem in this playground, and check for its error log, that you can find in attachment.

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

md5: 396a3598532e8284f57a3fc07b8d6bab

duplicates:

  • SR-10490 SIL Crash on Conditional Conformance for Self Conforming Types

Issue Description:

Starting from Swift 5, we start to hit a "Segmentation fault: 11" error on compile time. We encountered this error in our library FunctionalKit (it built perfectly for previous versions of Swift).

We found out that the problem is on the function `zip` that we defined for our `Result` type. In particular, error occur in compile-time if exists some code that use this `zip` function.

Starting from Swift 5, it seems to me that this error caused by the fact that the return type is:

`Result<Inclusive<F1,F2>,(A,B)> where Failure == Inclusive<F1,F2>, ParameterType == (A,B)`

and compiler is not able to understand that `Inclusive<F1,F2>` conforms to `Error` protocol, as requested by our `Result` type, even if we wrote

`extension Inclusive: Error where A: Error, B: Error {}`

@theblixguy
Copy link
Collaborator

Looks like SR-10490 which is apparently fixed, could you try with a Swift 5.1 development snapshot? Also, it could be related to my bug: SR-10441. They both crash in the Mangler so perhaps the issues are related.

@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
This issue was closed.
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.0
Projects
None yet
Development

No branches or pull requests

3 participants