Closed yob closed 2 years ago
To run the fuzzer against the checked out code:
$ ruby -Ilib tools/fuzz.rb spec/data/*.pdf
------------------------------------------------------------
% Fuzzer for pdf-reader Ruby gem
------------------------------------------------------------
In #248 @bcoles provided a fuzzer that we never merged.
Now that I'm experimenting with sorbet and static type checking, I'm curious to explore whether the type checking can help avoid many of the exceptions surfaced by the fuzzer.
In #428 the fuzzer was useful for testing that hypothesis on the
CMap
class, so I think it'd be helpful to have the script on main. This resurrects the original fuzzer, with a small fix to avoid a crash thanks to frozen strings.