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-4059] Compiler Crash on Subclasses Further Constraining Generics Initializer #46642

Closed
swift-ci opened this issue Feb 24, 2017 · 6 comments
Closed
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

Comments

@swift-ci
Copy link
Collaborator

Previous ID SR-4059
Radar None
Original Reporter Logan (JIRA User)
Type Bug
Status Resolved
Resolution Done
Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug, 3.1Regression, CompilerCrash
Assignee None
Priority Medium

md5: 918fe3645f29300276cb0a409197574f

Issue Description:

Not sure if that title is the ticket, but here's repro. Runs and builds fine on 3.0.2, crash seg fault on 3.1:

    class Base {
        init<S: Sequence>(_ s: S) where S.Iterator.Element == UInt8 {

        }
    }

    class Sub: Base {
        init(_ b: [UInt8]) {
            super.init(b)
        }
    }
@belkadan
Copy link
Contributor

Looks like this is fixed on master but still fails on the 3.1 branch. @huonw, any insights? Is there something small enough to pull in?

@huonw
Copy link
Mannequin

huonw mannequin commented Feb 24, 2017

I don't think anything I've done would've touched this. I recall @DougGregor doing something with where-clauses on methods a while ago, but I also recall that the situation there was possibly a little different. In summary, no insights.

@DougGregor
Copy link
Member

Swift 3.1 is apparently considering this initializer to be an override, then crashes later in SILGen. Master correctly doesn't consider it to be an override.

@DougGregor
Copy link
Member

GitHub master: #7788

Porting this to Swift 3.1 fixes the crasher there, which I'll do as soon as that PR merges.

@DougGregor
Copy link
Member

3.1 PR: #7792

@DougGregor
Copy link
Member

691c11f

@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
Projects
None yet
Development

No branches or pull requests

4 participants