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

Manish Goregaokar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 11 07:40:30 PST 2019


Manishearth added a comment.



> Can't you also generate LLVMFuzzerTestOneInput so that it calls LLVMFuzzerCustomOutput when e.g.
> 
>   LPM_DUMP_NATIVE_INPUT=1 ./binary <crash_input>
> 
> is called?

Yeah, I hadn't realized this was doable until earlier.

> 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).

These could work, I was hoping to closely match libFuzzer behavior on the autogeneration here. But we could pass some flag, I guess.

> E.g. we have -print_stats that prints machine-readable output, we can do something like that and guarantee it doesn't change.

We want the user to also have user-readable output, though.

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

I get this, I personally think this API is small, optional and should not be an issue. It produces the output line among all the other formatted lines (base64, hex, etc), which is good UX. In general having a post-fuzz hook seems like a useful concept to me.


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