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

Fix #1932 #2089

Merged
merged 4 commits into from
Apr 22, 2024
Merged

Fix #1932 #2089

merged 4 commits into from
Apr 22, 2024

Conversation

tokatoka
Copy link
Member

No description provided.

@@ -140,7 +140,7 @@ unsafe fn fuzz(options: &FuzzerOptions) -> Result<(), Error> {
// RNG
StdRand::with_seed(current_nanos()),
// Corpus that will be evolved, we keep it in memory for performance
CachedOnDiskCorpus::no_meta(PathBuf::from("./corpus_discovered"), 64)
CachedOnDiskCorpus::no_meta(PathBuf::from("./corpus_discovered"), 4)
Copy link
Member

Choose a reason for hiding this comment

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

For an example fuzzer this might be a bit small?

Copy link
Member Author

Choose a reason for hiding this comment

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

yeah that was for debugging
i forgot to remove

@@ -125,14 +119,14 @@ where
#[inline]
fn get(&self, idx: CorpusId) -> Result<&RefCell<Testcase<I>>, Error> {
let testcase = { self.inner.get(idx)? };
self.cache_testcase(testcase, idx, false)?;
self.cache_testcase(testcase, idx)?;
Ok(testcase)
}
/// Get by id; considers both enabled and disabled testcases
#[inline]
fn get_from_all(&self, idx: CorpusId) -> Result<&RefCell<Testcase<Self::Input>>, Error> {
Copy link
Member

Choose a reason for hiding this comment

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

Should we even cache if the testcase is disabled? I don't know if we usually want that, it should be used way less?

@domenukk
Copy link
Member

@R9295 FYI, the disabled testcases crashed the fuzzer for CachedOnDiskCorpus

@R9295
Copy link
Contributor

R9295 commented Apr 22, 2024

@domenukk Oh, my bad.

If I understood it correctly, it is because the disabled entry may be considered as enabled when the fuzzer restarts and the state is not serialized?

@tokatoka
Copy link
Member Author

no it's unrelated. see the end of #1932

@tokatoka tokatoka merged commit 0f3ad28 into main Apr 22, 2024
101 checks passed
@tokatoka tokatoka deleted the fix branch April 22, 2024 17:27
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.

None yet

3 participants