[PATCH] D70738: [libFuzzer] Add custom output function

Kostya Serebryany via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 10 16:46:13 PST 2019


kcc added a comment.

> We're using an autogenerated trait for this anyway, so we get this for free.

So, your LLVMFuzzerCustomOutput is generated. 
Can't you also generate LLVMFuzzerTestOneInput so that it calls LLVMFuzzerCustomOutput when e.g.

  LPM_DUMP_NATIVE_INPUT=1 ./binary <crash_input>

is called?

> Still, it's a bit annoying to have to parse the crash lines and hope that format never changes.

That part I am happy to resolve separately if you think it's a problem (but see my response above about the two flags, exact_artifact_path and artifact_prefix). 
E.g. we have -print_stats that prints machine-readable output, we can do something like that and guarantee it doesn't change. 
And, "hope that format never changes" can be solved by adding a test.

Just to reiterate: I'd love to solve the problem, I just don't think that introducing new public API is the right way.


Repository:
  rCRT Compiler Runtime

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D70738/new/

https://reviews.llvm.org/D70738





More information about the llvm-commits mailing list