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-1814] Crash on assignment of class array to protocol array #44423

Closed
swift-ci opened this issue Jun 18, 2016 · 1 comment
Closed

[SR-1814] Crash on assignment of class array to protocol array #44423

swift-ci opened this issue Jun 18, 2016 · 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 run-time crash Bug → crash: Swift code crashed during execution runtime The Swift Runtime

Comments

@swift-ci
Copy link
Collaborator

Previous ID SR-1814
Radar None
Original Reporter willclarke (JIRA User)
Type Bug
Status Resolved
Resolution Done
Environment

Xcode Version 7.3.1 (7D1014)

Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug, RunTimeCrash, Runtime
Assignee None
Priority Medium

md5: 52e26ca1ca9ed52842e02ada95731ce5

relates to:

  • SR-1813 Swift crashes emitting witness tables

Issue Description:

Run this code in a new command line app:

import Foundation

print("Hello, World!")

protocol P1 {}
protocol P2 {}
protocol P3: P1, P2 {}
class C4: P3 {}

var p1: [P1] = [C4()]
var p2: [P2] = [C4()]
var c4 = [C4()]

p1 = c4

Backtrace:

Hello, World!
fatal error: array cannot be bridged from Objective-C
(lldb) bt

  • thread Redundant Load Elimination Patches #1: tid = 0x1bd422, 0x00000001001a2f58 TestProject`function signature specialization <Arg[0] = Exploded, Arg[1] = Exploded, Arg[2] = Dead, Arg[3] = Dead> of Swift._fatalErrorMessage (Swift.StaticString, Swift.StaticString, Swift.StaticString, Swift.UInt) -> () + 40, queue = 'com.apple.main-thread', stop reason = EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0)
    frame #0: 0x00000001001a2f58 TestProject`function signature specialization <Arg[0] = Exploded, Arg[1] = Exploded, Arg[2] = Dead, Arg[3] = Dead> of Swift._fatalErrorMessage (Swift.StaticString, Swift.StaticString, Swift.StaticString, Swift.UInt) -> () + 40
    frame Redundant Load Elimination Patches #1: 0x00000001000355df TestProject`Swift._arrayForceCast <A, B> (Swift.Array<A>) -> Swift.Array<B> + 831

  • frame Remove unnecessary unsafeUnwrap calls. #2: 0x000000010026d737 TestProject`main + 519 at main.swift:22
    frame Initial implementation of a @_cdecl attribute to export top-level functions to C #3: 0x00007fff9aaca5ad libdyld.dylib`start + 1
    (lldb)

@slavapestov
Copy link
Member

Works in Xcode 8.3.

@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 run-time crash Bug → crash: Swift code crashed during execution runtime The Swift Runtime
Projects
None yet
Development

No branches or pull requests

3 participants