-
-
Notifications
You must be signed in to change notification settings - Fork 292
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
Add remove_from_all method to Corpus
trait
#2259
Conversation
@R9295 Can you check this? |
Looks like the LibfuzzerCorpus & ArtifactCorpus also need remove_from_all implementations. LGTM otherwise |
libafl/src/corpus/cached.rs
Outdated
@@ -115,6 +115,13 @@ where | |||
Ok(testcase) | |||
} | |||
|
|||
/// Removes an entry from the corpus, returning it if it was present; considers both enabled and disabled testcases. | |||
fn remove_from_all(&mut self, idx: CorpusId) -> Result<Testcase<Self::Input>, Error> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't remove
just remove from wherever? Why does it make a difference if the testcase is disabled or not?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
every thing without all
does not touch disabled entry
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMHO remove should remove, no matter what
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Like, ask yourself: Why would you ever not use the remove_from_all
method? How would you end up with a valid CorpusId that you don't want to remove just because it's disabled?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok i'll change
No description provided.