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

Change Corpus Pruning algorithm #2418

Merged
merged 18 commits into from
Jul 18, 2024
Merged

Change Corpus Pruning algorithm #2418

merged 18 commits into from
Jul 18, 2024

Conversation

tokatoka
Copy link
Member

No description provided.

@tokatoka tokatoka requested a review from domenukk July 17, 2024 15:37
@tokatoka tokatoka merged commit 4f970ba into main Jul 18, 2024
98 checks passed
@tokatoka tokatoka deleted the pruning branch July 18, 2024 09:11
corpus.add_disabled(removed)?;
}
for (idx, testcase) in enabled_to_disabled {
state.corpus_mut().add_disabled(testcase)?;
Copy link
Member

Choose a reason for hiding this comment

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

I don't think we should ever allow a call to call add(_disabled) with a testcase that's already added, we should have a set_enabled(true/false) method instead

Copy link
Member

Choose a reason for hiding this comment

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

it seems counter-intuitive as API, and it will hide bugs where we add them twice by accident

Copy link
Member Author

Choose a reason for hiding this comment

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

but this testcase is not "already added" at this point of execution, because we just removed it a few lines before.

Copy link
Member Author

@tokatoka tokatoka Jul 18, 2024

Choose a reason for hiding this comment

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

we should have a set_enabled(true/false) method instead

yes i know.
but if we will implement it, then internally it would look the same as this. because disabled and enabled have separate corpus. if you want move them, then the only way is (i guess) to delete from one and then add to the other

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.

2 participants