[PATCH] D38855: Add a fuzz target for llvm's ItaniumDemangler.

Justin Bogner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 12 11:18:21 PDT 2017


bogner added a comment.

This is pretty straightforward, but if you'd like to add a test for it you can do so by implementing a main function that doesn't link to libfuzzer. It would probably just be something like this:

  extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size);
  int main(int argc, char *argv[]) {
    return llvm::runFuzzerOnInputs(argc, argv, LLVMFuzzerTestOneInput);
  }

Then you'd add the file you added as a DUMMY_MAIN argument to add_llvm_fuzzer. See llvm-isel-fuzzer for details.


https://reviews.llvm.org/D38855





More information about the llvm-commits mailing list