SyncFromBrokerStage: report actual corpus_size in NewTestcase events#3756
Open
0xmuon wants to merge 1 commit intoAFLplusplus:mainfrom
Open
SyncFromBrokerStage: report actual corpus_size in NewTestcase events#37560xmuon wants to merge 1 commit intoAFLplusplus:mainfrom
0xmuon wants to merge 1 commit intoAFLplusplus:mainfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
I investigated how
Event::NewTestcase { corpus_size, etc}is produced infuzzer/mod.rsand consumed by the broker inevents/simple.rs(viaupdate_corpus_sizeon the client stats). In that path,corpus_sizeis clearly treated as clients current corpus size, not as a placeholder.also to find behavior of SyncFromBrokerStage, I built and ran a custom multiclient fuzzer (sync_broker_test, which uses
SyncFromBrokerStage) with--cores 0,1,2. I then set corpus_size set to both0andstate.corpus().count()and tested, by adding temporary logging behindSYNC_CORPUS_SIZEflag to see the exact values being sent during sync(logs not included in commit as not needed). While the minimal tests UI did not visibly break whencorpus_sizewas0, thelogsshowed thatSyncFromBrokerStagewas the onlyNewTestcaseproducer that did not report the realstate.corpus().count().Therefore,SyncFromBrokerStagenow sends the actualstate.corpus().count()ascorpus_size, so allNewTestcaseevents follow the same semantics and future monitoring does not need to special‑case a hardcoded 0.I can provide that fuzzer if you need.
Checklist
./scripts/precommit.shand addressed all comments