Files
Billy O'NealandCopilot 8b568f8de8 Adopt libfuzzer to replace AFL. (#1951)
* Adopt libfuzzer to replace AFL.

libfuzzer is more efficient because it does in-process fuzzing. This also allows fuzzing with the tools that come in the box with Visual Studio. libfuzzer makes each parser test into its own separate executable.

Other changes:
* All Unicode handling had to be hardened to not just terminate the process if the input isn't valid UTF-8. As a result terminating operations like ++ on Utf8Decoder were removed and all callers were changed to call next() and handle errors.
* The JSON parser constantly hit stack overflows which terminated the process and stopped fuzzing. To resolve that, introduced a max recursion depth of 200.

* Accidentially left in a __debugbreak

* Drop unnecessary _cdecl

* Avoid some compiler warnings.

* Use VCPKG_BUILD_FUZZING on Linux.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-04-02 12:54:34 -07:00
..