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-6408] JSONDecoder internal state could be corrupted #4051

Closed
swift-ci opened this issue Nov 16, 2017 · 3 comments
Closed

[SR-6408] JSONDecoder internal state could be corrupted #4051

swift-ci opened this issue Nov 16, 2017 · 3 comments
Assignees

Comments

@swift-ci
Copy link
Contributor

Previous ID SR-6408
Radar rdar://problem/36336754
Original Reporter zintus (JIRA User)
Type Bug
Status Resolved
Resolution Done

Attachment: Download

Environment

Apple Swift version 4.0.2 (swiftlang-900.0.69.2 clang-900.0.38)

Additional Detail from JIRA
Votes 0
Component/s Foundation
Labels Bug
Assignee @itaiferber
Priority Medium

md5: cff22254279e48071629a61c51de8a2c

is duplicated by:

  • SR-6563 JSON decoder's internal state messed up after nested decoding failed
  • SR-5981 Decodable: Decoding TimeZone within class hierarchy leads to bad container

relates to:

  • SR-6078 crashes with nested throwing values in JSON/PList Encoder

Issue Description:

JSONDecoder internal state could be corrupted by attempt to decode nested object. Such decoder instance become unusable.

In the attached playground, try to change value of `tryToDecodeNestedFailingObject` to see wrong behaviour.

@swift-ci
Copy link
Contributor Author

Comment by Alexey Zinchenko (JIRA)

Opened apple/swift#12969

@itaiferber
Copy link
Contributor

Fix went into master in PR-13879; now up against Swift 4.1 at PR-13900

@itaiferber
Copy link
Contributor

Merged to swift-4.1-branch in PR-13900

This issue was closed.
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