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

BUG: Incorrect implementation of program_generator_seed #104

Closed
brianfu opened this issue Jul 4, 2024 · 1 comment
Closed

BUG: Incorrect implementation of program_generator_seed #104

brianfu opened this issue Jul 4, 2024 · 1 comment
Assignees
Labels
bug Something isn't working
Milestone

Comments

@brianfu
Copy link
Contributor

brianfu commented Jul 4, 2024

When trying to reproduce a violation via tfuzz, we cannot re-generate the same program using the program_generator_seed parameter in the yaml as intended.

For example, if our violation is found after 4822 test programs, using initial program_generator_seed 830819, then our violation-causing program seed should be 830819 + 4822 = 835641. This appears to work as expected (i.e. if we can actually set the seed to 835641, then we will generate the same violating program).

However, when running tfuzz using the same template, if we want to generate this violating program again, we must run with at least -n 2. If our desired seed is 835641, we must set program_generator_seed: 835640 and use -n 2 to (eventually) generate the program with seed 835641.

If we only use -n 1 and program_generator_seed: 835641, then we will not be able to re-generate the same program, likely instead generating the program at seed 835642.

A secondary request would be to insert the program seed into the "Generation Properties" portion of the output report.txt.
Currently, it only shows the given program seed used when launching Revizor, not the seed used to find the violating test case.
If the initial seed is randomized as is default, then the "Program seed" value will show as 0 when output.

@brianfu brianfu changed the title Incorrect implementation of program_generator_seed BUG: Incorrect implementation of program_generator_seed Jul 4, 2024
@OleksiiOleksenko OleksiiOleksenko self-assigned this Jul 18, 2024
@OleksiiOleksenko OleksiiOleksenko added the bug Something isn't working label Jul 18, 2024
@OleksiiOleksenko OleksiiOleksenko added this to the v1.4 milestone Jul 18, 2024
@OleksiiOleksenko
Copy link
Contributor

Fixed in the dev branch. Will be merged in the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants