OSDN Git Service

[libFuzzer] Allow non-fuzzer args after -ignore_remaining_args=1
authorJustin Bogner <mail@justinbogner.com>
Fri, 14 Jul 2017 23:33:04 +0000 (23:33 +0000)
committerJustin Bogner <mail@justinbogner.com>
Fri, 14 Jul 2017 23:33:04 +0000 (23:33 +0000)
commit948973b73f8e751fb576c077316a0922c19f6257
tree4b74b692c3f1751f627977cf723563e134100f2e
parentf8411a4be96755613606f8fdf13d7847ba075922
[libFuzzer] Allow non-fuzzer args after -ignore_remaining_args=1

With this change, libFuzzer will ignore any arguments after a sigil
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308069 91177308-0d34-0410-b5e6-96231b3b80d8
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 [new file with mode: 0644]
lib/Fuzzer/test/fuzzer-flags.test