rgbds icon indicating copy to clipboard operation
rgbds copied to clipboard

Debug RGBDS with a fuzzer (afl? libfuzzer?)

Open ISSOtm opened this issue 3 years ago • 7 comments

meithecatte did it back then I think with AFL, but LLVM also has libfuzzer, which seems to be easier to set up.

ISSOtm avatar May 07 '22 12:05 ISSOtm

Basic setup:

  • Build the programs as a library (i.e., no main)
  • Create the fuzzer entry point (int LLVMFuzzerTestOneInput (const unsigned char *, size_t); must accept any input, run it and return 0)
  • Link the whole thing and build with -fsanitize=fuzzer and you're done: the resulting binary fuzzes the program

aaaaaa123456789 avatar May 07 '22 12:05 aaaaaa123456789