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

Default ignore_* flags to true when tui=1 #1820

Merged
merged 3 commits into from
Jan 30, 2024

Conversation

skoriop
Copy link
Contributor

@skoriop skoriop commented Jan 29, 2024

Closes #1566

When the tui flag is set, we default ignore_crashes, ignore_ooms and ignore_timeouts to true.

The no_ignore_... struct members of LibfuzzerOptionsBuilder are used to distinguish between the user not using a flag and the user explicitly setting a flag to false (0) as both these cases result in the ignore_... struct member being false.

@@ -242,6 +242,9 @@ struct LibfuzzerOptionsBuilder<'a> {
ignore_crashes: bool,
ignore_timeouts: bool,
ignore_ooms: bool,
no_ignore_crashes: bool,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should instead use an enum here, maybe something something like
`rust
enum Setting {
Enabled,
Disabled,
Default,
}

or even have a `Tui` enum variant here?
Alternatively, maybe an `Option<bool>` would work?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup, I think using Option<bool> is a much cleaner approach.

@domenukk
Copy link
Member

Thanks! What do you think about my suggestion?

@domenukk
Copy link
Member

Sweet, thanks!

@domenukk domenukk merged commit 519ea43 into AFLplusplus:main Jan 30, 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.

tui should imply ignore_*
2 participants