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-10626] EXC_BREAKPOINT when creating a collection of specific type hierarchy. #53026

Closed
swift-ci opened this issue May 6, 2019 · 2 comments
Assignees
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself runtime The Swift Runtime

Comments

@swift-ci
Copy link
Collaborator

swift-ci commented May 6, 2019

Previous ID SR-10626
Radar None
Original Reporter kcfancher (JIRA User)
Type Bug
Status Resolved
Resolution Duplicate
Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug, Runtime
Assignee @aschwaighofer
Priority Medium

md5: 32f47a204e031efe8dfbcd863ced6622

duplicates:

  • SR-10445 EXC_BAD_INSTRUCTION when accessing property compiled with Xcode 10.2

Issue Description:

This originated from a discussion on the forums: https://forums.swift.org/t/exc-breakpoint-when-creating-array-with-specific-types/24060

Given WrappingStruct which contains two properties, an SingleValueEnum and a Date. This causes an EXC_BREAKPOINT crash when run in the debugger.

This crash seems to be closely tied to the types used and the exact structure created. It can be resolved via any of the below
a.) Adding a second case to the enum
b.) Changing the associated value from TimeZone to String
c.) Adding a third property to the struct
d.) Removing the enum property from the struct

Quinn helped me to boil my example down in the forum post to an even smaller test case.

```
import Foundation

enum SingleValueEnum {
case timezone(TimeZone)
}

struct WrappingStruct_Fails {
let enumValue: SingleValueEnum
let date: Date
}

func main() {
let fails = [WrappingStruct_Fails]()
print("fails: (fails)")
}

main()

```

@belkadan
Copy link
Contributor

belkadan commented May 6, 2019

aschwaighofer@apple.com (JIRA User), this was fixed on master, right?

@aschwaighofer
Copy link
Member

Yes this should not reproduce with a recent master or swift-5.1-branch toolchain.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 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 runtime The Swift Runtime
Projects
None yet
Development

No branches or pull requests

3 participants