Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fuzzer started from second instead of first pass as default when using Driver #147

Merged
merged 1 commit into from
Dec 16, 2024

Conversation

matteB10
Copy link
Contributor

@matteB10 matteB10 commented Nov 25, 2024

In the run() method in driver.h, the "test_start_pass" for fuzzing was previously selected as test_start_pass = pass_names.at(1); which gives the second pass after the parser but compensates for the initial pass being the pass at start_index - 1 in the method test() in the Fuzzer class.

However, the start_index for the returned Fuzzer object returned from reader.pass_index() compensates in the other direction and adds +1 to the pass index, meaning the first pass in the pass sequence in the reader does not get tested if not given explicitly.

  return Fuzzer(reader)
           ...
          .start_index(reader.pass_index(test_start_pass))
          ...
          .test();

I just added the minimal fix to start fuzz testing from the first pass as default, but perhaps the logic in pass_index and test() could also be changed.

@sylvanc sylvanc merged commit 7825421 into microsoft:main Dec 16, 2024
22 checks passed
matteB10 added a commit to matteB10/Trieste that referenced this pull request Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants