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

fix: UserErrors leave json_parse in an invalid state #12308

Closed

Conversation

kevinwilfong
Copy link
Contributor

Summary:
When json_parse throws a user error and it's not wrapped in a try, if that exception is caught
outside expression evaluation and the ExprSet attempts to be reused, the json_parse function
may be in an invalid state and will throw a runtime exception.

This was exposed in ExpressionFuzzer after
#12281 was landed.

This fix is to clear the state whenever we see a UserException after calling parse whether or not
the function is wrapped in a try.

Differential Revision: D69473523

Summary:
When json_parse throws a user error and it's not wrapped in a try, if that exception is caught
outside expression evaluation and the ExprSet attempts to be reused, the json_parse function
may be in an invalid state and will throw a runtime exception.

This was exposed in ExpressionFuzzer after 
facebookincubator#12281 was landed.

This fix is to clear the state whenever we see a UserException after calling parse whether or not 
the function is wrapped in a try.

Differential Revision: D69473523
@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Feb 11, 2025
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D69473523

Copy link

netlify bot commented Feb 11, 2025

Deploy Preview for meta-velox canceled.

Name Link
🔨 Latest commit d8ab959
🔍 Latest deploy log https://app.netlify.com/sites/meta-velox/deploys/67ab9bfcfa475000080a92a5

@facebook-github-bot
Copy link
Contributor

This pull request has been merged in b71648f.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported Merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants