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-14633] Generic structs sometimes cause a crash when using existential types (only in Xcode Playground) #56

Open
swift-ci opened this issue May 14, 2021 · 1 comment

Comments

@swift-ci
Copy link

Previous ID SR-14633
Radar rdar://problem/78224316
Original Reporter fermion17 (JIRA User)
Type Bug
Environment

iMac (Retina 5K, 27-inch, 2019), macOS 11.3, Xcode 12.5

MacBook Pro (Retina, 15-inch, Mid 2015), macOS 10.15.7, Xcode 12.3

Additional Detail from JIRA
Votes 0
Component/s Xcode Playground Support
Labels Bug
Assignee None
Priority Medium

md5: e78de01bb76e1378e78ad689d5720824

Issue Description:

Generic structs S<T> cause a crash when:

  • it contains a field with type T?

  • it is specialized by an existential type, e.g. S<P> where P is a protocol.

For example, the following code in Xcode Playground causes a crash.

protocol P {}
struct S<T> {
    let field: T? = nil
}
let x = S<P>() // error: Execution was interrupted, reason: EXC_BAD_ACCESS (code=EXC_I386_GPFLT).

This issue only occurs in Xcode Playground.

@typesanitizer
Copy link

@swift-ci create

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@shahmishal shahmishal transferred this issue from swiftlang/swift May 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants