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-7905] Crash when wrapping objc value in swift enum #50440

Open
swift-ci opened this issue Jun 7, 2018 · 9 comments
Open

[SR-7905] Crash when wrapping objc value in swift enum #50440

swift-ci opened this issue Jun 7, 2018 · 9 comments
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

Comments

@swift-ci
Copy link
Collaborator

swift-ci commented Jun 7, 2018

Previous ID SR-7905
Radar None
Original Reporter noahsmartin (JIRA User)
Type Bug
Status In Progress
Resolution

Attachment: Download

Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug, RunTimeCrash
Assignee noahsmartin (JIRA)
Priority Medium

md5: 1761e50f052c28a2d5c143c2b61f9d40

Issue Description:

The attached sample project reproduces a crash on swift_unknownRelease when a value created in objective-c is wrapped in an enum in swift. Moving the objective-c code to swift seems to fix the crash.

To reproduce, build and run the sample project using Xcode 10 on the iPhone X simulator.

@swift-ci
Copy link
Collaborator Author

swift-ci commented Jun 7, 2018

Comment by Mati Bot (JIRA)

Noah, great job reproducing this crash! cc: @gottesmm

@gottesmm
Copy link
Member

gottesmm commented Jun 7, 2018

Thanks to both of you![]( Also, nice seeing you online Mat) A small reproducer is exactly what I needed. Let me take a look at this real quick.

@gottesmm
Copy link
Member

gottesmm commented Jun 7, 2018

Also thank you for doing it in the simulator. It makes this a lot easier.

@gottesmm
Copy link
Member

gottesmm commented Jun 7, 2018

Reproduced the crasher.

@gottesmm
Copy link
Member

gottesmm commented Jun 7, 2018

Just attached macosRepro.tar.gz. It is a repro that is outside of Xcode.

@gottesmm
Copy link
Member

gottesmm commented Jun 8, 2018

matibot (JIRA User) I think we may have fixed this bug already. It doesn't reproduce with ToT. I am going to see what the difference is in the SIL.

@gottesmm
Copy link
Member

gottesmm commented Jun 8, 2018

SIL is the same.

@gottesmm
Copy link
Member

gottesmm commented Jun 8, 2018

This is:

#16916

So it is fixed. matibot (JIRA User) can you guys try with a snapshot from swift.org:

https://swift.org/download/#snapshots

@gottesmm
Copy link
Member

gottesmm commented Jun 8, 2018

Make sure you try the 4.2 one.

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

No branches or pull requests

3 participants