[PATCH] [libFuzzer] Allow non-fuzzer args after "--"

Kostya Serebryany via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 13 18:02:08 PDT 2017


thought a bit more...
It's really hard for me to verify that this change won't break anything,
so how about making this in some different way?
e.g.
./fuzzer-binary -flag1=foo -flag2=bar -ignore-all-following-arguments=1
llvm-arg1 llvm-arg2

(And please do use phabricator :)


On Wed, Jul 12, 2017 at 2:52 PM, Kostya Serebryany <kcc at google.com> wrote:

> 1. phabricator maybe?
> 2. need to think. This flag business is messy
>
> On Wed, Jul 12, 2017 at 2:41 PM, Justin Bogner <mail at justinbogner.com>
> wrote:
>
>> 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 "--" in LLVMFuzzerInitialize.
>>
>> The motivation here is in trying to set up fuzzers that use the LLVM
>> backend, for example so that we can pass "-global-isel" in an ISel
>> fuzzer to test that instead of SelectionDAG.
>>
>> Ok to commit?
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170713/82f22ef4/attachment.html>


More information about the llvm-commits mailing list