This is an archive of the discontinued LLVM Phabricator instance.

[libFuzzer] Allow non-fuzzer args after -ignore_remaining_args=1
ClosedPublic

Authored by bogner on Jul 14 2017, 3:26 PM.

Details

Reviewers
kcc
Summary

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

Diff Detail

Repository
rL LLVM

Event Timeline

bogner created this revision.Jul 14 2017, 3:26 PM
kcc accepted this revision.Jul 14 2017, 3:55 PM

LGTM with a nit. Thanks!

lib/Fuzzer/test/FlagsTest.cpp
11

update the comment

This revision is now accepted and ready to land.Jul 14 2017, 3:55 PM
bogner closed this revision.Jul 14 2017, 4:35 PM

r308069