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?
to your account
The current logic in json/decode.go does the following:
Lines 173 to 178
This captures any panics that aren't runtime.Error, which is arguably a wider range of panics than should be captured. For example, a panic in the reflect package gets masked away as an error.
The logic in decodeState.error should wrap the error before panicking to ensure the recover only captures errors originating from the json package:
Lines 298 to 301
The text was updated successfully, but these errors were encountered:
Change https://golang.org/cl/94019 mentions this issue: encoding/json: make error capture logic in recover more type safe
encoding/json: make error capture logic in recover more type safe
Sorry, something went wrong.
No branches or pull requests