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-3563] EXC_BAD_ACCESS related to returning nested tuples from closures #46151

Open
swift-ci opened this issue Jan 6, 2017 · 1 comment
Open
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 regression run-time crash Bug → crash: Swift code crashed during execution swift 3.0

Comments

@swift-ci
Copy link
Collaborator

swift-ci commented Jan 6, 2017

Previous ID SR-3563
Radar None
Original Reporter Thomvis (JIRA User)
Type Bug

Attachment: Download

Environment

Xcode 8.2, macOS Sierra

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

md5: 6d23a2ff463bf13de8dd3be5247673cf

Issue Description:

After upgrading from Swift 2.3 to Swift 3, I've encountered a new runtime crash having to do with returning nested typealiased tuples. I've not yet been able to reduce the issue to a simple example, but I thought I should file it nonetheless. I hope you can point me in the right direction as to how to make a minimal example.

To work around the issue, I had to replace a tuple with a struct. You can see the diff in the attached screenshot. The crash happens on the original (right) line 37.

Other info:

  • `HSCartDataController.TokenContext` is a typealias of a tuple itself

  • happens in debug and release builds

I apologise if a bug report like this, with code that has so much going on, is not useful. Let me know how I can help!

@belkadan
Copy link
Contributor

belkadan commented Jan 6, 2017

@slavapestov, this looks kind of like the tuple things you've been investigating. Notice that the returned tuple is immediately passed through to the argument to map.

(The diff is Xcode-style, with the new code on the left.)

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

No branches or pull requests

3 participants