Closed
Description
Currently, we use the same mutation engine for string
and []byte
. This tends to generate a lot of invalid UTF-8 strings that aren't usable for many use cases. While invalid UTF-8 is likely to turn up many shallow parser bugs, it may make the mutator less effective at finding more subtle, deeper bugs.
We should have an option to make the mutator only generate UTF-8. Some ideas:
- Create a
UTF8String
defined type. A fuzz function that accepts that as a parameter would only get valid UTF-8 strings. - Only provide valid UTF-8 strings for
string
parameters. A function could request[]byte
for random bytes, and that can still be converted tostring
.
cc @golang/fuzzing @findleyr
Metadata
Metadata
Assignees
Labels
Type
Projects
Status