Skip to content

Conversation

@tlively
Copy link
Member

@tlively tlively commented Mar 26, 2024

Previously we printed strings as WTF-8 in the output of fuzz-exec, but this
could produce invalid unicode output and did not make unprintable characters
visible. Fix both these problems by escaping the output, using the JSON string
escape procedure since the string to be escaped is WTF-16. Reimplement the same
escaping procedure in fuzz_shell.js so that the way we print strings when
running on a real JS engine matches the way we print them in our own fuzz-exec
interpreter.

Fixes #6435.

@tlively tlively requested a review from kripken March 26, 2024 05:49
@tlively
Copy link
Member Author

tlively commented Mar 26, 2024

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @tlively and the rest of your teammates on Graphite Graphite

Previously we printed strings as WTF-8 in the output of fuzz-exec, but this
could produce invalid unicode output and did not make unprintable characters
visible. Fix both these problems by escaping the output, using the JSON string
escape procedure since the string to be escaped is WTF-16. Reimplement the same
escaping procedure in fuzz_shell.js so that the way we print strings when
running on a real JS engine matches the way we print them in our own fuzz-exec
interpreter.

Fixes #6435.
@tlively tlively force-pushed the escape-exec-strings branch from f65a41a to 3f1bcbf Compare March 26, 2024 05:51
Copy link
Member

@kripken kripken left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm with fuzzing

@tlively
Copy link
Member Author

tlively commented Mar 26, 2024

Fuzzer seems happy with this (and I checked that if I introduce a bug, it gets picked up relatively quickly).

@tlively tlively merged commit 431e858 into main Mar 26, 2024
@tlively tlively deleted the escape-exec-strings branch March 26, 2024 17:44
@gkdn gkdn mentioned this pull request Aug 31, 2024
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.

Internal UTF / Python error in fuzzer

3 participants