[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 09/14] fuzz/x86_emulate: Take multiple test files for inputs



On Fri, Sep 15, 2017 at 02:27:35PM +0100, George Dunlap wrote:
> >>                  perror("fopen");
> >> @@ -87,7 +94,9 @@ int main(int argc, char **argv)
> >>          if ( !feof(fp) || size > INPUT_SIZE )
> >>          {
> >>              printf("Input too large\n");
> >> -            exit(-1);
> >> +            if ( optind + 1 ==  argc )
> > 
> > What is this for?
> 
> Only call exit() when the file is too large if the current testcase is
> the last one.
> 
> One of the "interesting testcases" that AFL finds is always "The file
> was too large".  Without this clause, "afl-harness-cov [blah] queue/id*"
> would process testcases until it found that one, then stop processing,
> rather than processing the full set of them.
> 
> We could make this something like "if ( max == 1 )" (only exit if not in
> 'batch mode') if you think that would be better.
> 

Yes the new check looks clearer to me.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.