[PATCH] D65661: [compiler-rt] Move FDP to include/fuzzer/FuzzedDataProvider.h for easier use.

Matt Morehouse via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 5 11:29:18 PDT 2019


morehouse accepted this revision.
morehouse added a comment.
This revision is now accepted and ready to land.

In D65661#1612573 <https://reviews.llvm.org/D65661#1612573>, @lebedev.ri wrote:

> Yep, i failed to convey the problem.
>  Any code that uses that header will get locked into compiler that provides said header,
>  unless they resort to bundling said header in the first place, which will be frowned upon.


Without this patch, any project that wants to use this header needs to add a vendored copy of FDP to their source repository.  With this patch, non-clang will still have to do this, though projects that build with clang will not.  To me, this seems very beneficial for every project on OSS-Fuzz (and any other project that uses libFuzzer), since they support building with clang anyway.

> Any code - at least the fuzzers, which somewhat contradicts the recommendations of oss-fuzz
>  for fuzz targets to be tested during *normal* builds. And really, this structure would need to
>  be consistently used through the code for best results,
>  in which case the entire codebase will get compiler-locked.

Yes, the alternative is to use a vendored FDP.  I agree it's ugly, but no uglier than is currently required.

I think this patch has more upside than downside.  We strictly improve the case for projects using clang already, while leaving things the same for non-clang.


Repository:
  rCRT Compiler Runtime

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

https://reviews.llvm.org/D65661





More information about the llvm-commits mailing list