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

[Strings] Escape strings printed by fuzz-exec #6441

Merged
merged 1 commit into from
Mar 26, 2024
Merged

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.
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
27 checks passed
@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
2 participants