-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
wasm: Fix JSON parser to copy memory for strings and numbers
Previously the parser was constructing strings and numbers with references to the input buffer memory. If that memory was freed after the opa_json_parse() call, it would corrupt the strings and numbers returned by the parse. This commit just updates the parser to create a copy of the string/number values. If this becomes a performance issue in the future, we can introduce an optional API for callers that promise NOT to free the input buffer. Signed-off-by: Torin Sandall <torinsandall@gmail.com>
- Loading branch information
Showing
6 changed files
with
67 additions
and
4 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters