Skip to content

[6.0] rdar://132940984 (Regression: Swift Decoding of Double.greatestFiniteMagnitude as Int causes a crash) (#827) #829

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

Conversation

kperryua
Copy link
Contributor

@kperryua kperryua commented Aug 6, 2024

Explanation: Restores previous behavior of throwing an error when a JSON floating point number (during slow-path integer parsing) fails to decode as Double.
Scope: Limited to JSONDecoder usages that attempt to parse very large floating point numbers as integers.
Original PR: #827
Risk: Minimal - fixes a regression that introduced an unexpected preconditionFailure
Reviewer: @itingliu

…FiniteMagnitude as Int causes a crash) (swiftlang#827)

(cherry picked from commit c67f24e)
@kperryua kperryua requested a review from itingliu August 6, 2024 17:34
@kperryua
Copy link
Contributor Author

kperryua commented Aug 6, 2024

@swift-ci please test

@kperryua kperryua merged commit 3e81cb0 into swiftlang:release/6.0 Aug 6, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants