Sean Gilligan
|
6a2250e164
|
Add coverage for toml encoder (#9834)
This change fuzzes random dictionaries at the different toml encoders to
get coverage of `toml/encoder.py`. The dictionary fuzzing technique
(`atheris_dict.py`) is derivative of another library
[python-dict](github.com/abc), which is attributed in the source code.
Doing some local runs this takes `toml/encoder.py` from `16%` to `64%`
statement coverage when using libfuzz.
Interestingly I'm finding for certain parameters like the `ENCODER`
selection Python random `choice()` statements are a lot more effective
at getting coverage that the `fdp.PickValueInList()` getting an extra 9%
coverage. For now I've kept everything as the atheris fuzzer but can
switch this over if you think it's worth doing.
The introspector call graphs and coverage don't look right, which is
likely related to the existing issues on
[https://github.com/ossf/fuzz-introspector](https://github.com/ossf/fuzz-introspector).


|
2023-03-09 04:02:31 -08:00 |