Skip to content
This repository has been archived by the owner on Nov 1, 2023. It is now read-only.

Commit

Permalink
Force -runs=1 when invoking in repro mode (#1651)
Browse files Browse the repository at this point in the history
Co-authored-by: Marc Greisen <marc@greisen.org>
  • Loading branch information
ranweiler and mgreisen authored Feb 28, 2022
1 parent 16166e1 commit f918299
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/agent/onefuzz/src/libfuzzer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,15 @@ impl<'a> LibFuzzer<'a> {
// good input, which libfuzzer works as we expect.

let mut cmd = self.build_command(None, None, None).await?;

// Override any arg of the form `-runs=<N>` (last occurrence wins).
// In this command invocation, we only ever want to test inputs once.
//
// Assumes that the presence of an `-args` option was an iteration limit meant
// for fuzzing mode. We are only mutating the args of a local `Command`, so the
// command used by the `fuzz()` method will still receive the iteration limit.
cmd.arg("-runs=1");

cmd.arg(&input);

let result = cmd
Expand Down

0 comments on commit f918299

Please sign in to comment.