[PATCH] D35442: [libFuzzer] Allow non-fuzzer args after -ignore_remaining_args=1

Justin Bogner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 14 15:26:42 PDT 2017


bogner created this revision.
Herald added subscribers: mgorny, mcrosier.

With this change, libFuzzer will ignore any arguments after an empty double dash argument, but it will preserve these arguments at the end of the command line when launching subprocesses. Using this, its possible to handle positional and single-dash arguments to the program under test by discarding everything up to -ignore_remaining_args=1 in LLVMFuzzerInitialize.

Updated and split from the original review because Kostya asked for phabricator. See the earlier discussion here: http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20170710/469109.html


Repository:
  rL LLVM

https://reviews.llvm.org/D35442

Files:
  lib/Fuzzer/FuzzerDriver.cpp
  lib/Fuzzer/FuzzerFlags.def
  lib/Fuzzer/FuzzerMerge.cpp
  lib/Fuzzer/FuzzerUtil.h
  lib/Fuzzer/test/CMakeLists.txt
  lib/Fuzzer/test/FlagsTest.cpp
  lib/Fuzzer/test/fuzzer-flags.test

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D35442.106720.patch
Type: text/x-patch
Size: 6907 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170714/536e3ffc/attachment.bin>


More information about the llvm-commits mailing list