[all-commits] [llvm/llvm-project] 711b98: [fuzzer] Create user provided fuzzer writeable dir...

Matt Morehouse via All-commits all-commits at lists.llvm.org
Thu Sep 3 08:32:34 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 711b9806547b0392ff636499cebfb73f72d4c595
      https://github.com/llvm/llvm-project/commit/711b9806547b0392ff636499cebfb73f72d4c595
  Author: Matt Morehouse <mascasa at google.com>
  Date:   2020-09-03 (Thu, 03 Sep 2020)

  Changed paths:
    M compiler-rt/lib/fuzzer/FuzzerDriver.cpp
    M compiler-rt/lib/fuzzer/FuzzerFlags.def
    M compiler-rt/lib/fuzzer/FuzzerIO.cpp
    M compiler-rt/lib/fuzzer/FuzzerIO.h
    M compiler-rt/test/fuzzer/fuzzer-dirs.test

  Log Message:
  -----------
  [fuzzer] Create user provided fuzzer writeable directories when requested if they dont exist

Currently, libFuzzer will exit with an error message if a non-existent
directory is provided for any of the appropriate arguments. For cases
where libFuzzer is used in a specialized embedded environment, it would
be much easier to have libFuzzer create the directories for the user.

This patch accommodates for this scenario by allowing the user to provide
the argument `-create_missing_dirs=1` which makes libFuzzer attempt to
create the `artifact_prefix`, `exact_artifact_path`,
`features_dir` and/or corpus directory if they don't already exist rather
than throw an error and exit.

Split off from D84808 as requested [here](https://reviews.llvm.org/D84808#2208546).

Reviewed By: morehouse

Differential Revision: https://reviews.llvm.org/D86733




More information about the All-commits mailing list