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

Allow corpus removal during main fuzz loop #1717

Merged
merged 2 commits into from
Jan 24, 2024

Conversation

hgarrereyn
Copy link
Contributor

While working on a fuzzer I was trying to implement a stage that would sometimes remove elements from the corpus. It is theoretically possible except I kept hitting this error in StdFuzzer::fuzz_one where it expected the corpus element to exist after the completion of all the stages.

The patch here just allows fuzzing to continue if the corpus entry no longer exists, rather than throwing an error as it did before.

@domenukk domenukk requested a review from addisoncrump December 7, 2023 13:50
@domenukk
Copy link
Member

domenukk commented Dec 7, 2023

thread 'rustc' panicked at compiler/rustc_infer/src/infer/generalize.rs:28:40:
called `Result::unwrap_err()` on an `Ok` value: ?11t

oO

Anyway @addisoncrump could you take a look you know more about side effects of removing testcases I guess

@addisoncrump
Copy link
Collaborator

Hm, the error associated with fetching the testcase should probably be checked. Also, idx should be updated if the testcase doesn't exist, because there are other stages which expect testcases to exist.

@domenukk
Copy link
Member

domenukk commented Jan 1, 2024

What should we do here?

@domenukk
Copy link
Member

Merging this for now, feel free to fix @addisoncrump

@domenukk domenukk merged commit e117b71 into AFLplusplus:main Jan 24, 2024
15 of 16 checks passed
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