Skip to content

SyncFromBrokerStage: report actual corpus_size in NewTestcase events#3756

Open
0xmuon wants to merge 1 commit intoAFLplusplus:mainfrom
0xmuon:sync-broker
Open

SyncFromBrokerStage: report actual corpus_size in NewTestcase events#3756
0xmuon wants to merge 1 commit intoAFLplusplus:mainfrom
0xmuon:sync-broker

Conversation

@0xmuon
Copy link

@0xmuon 0xmuon commented Mar 15, 2026

Description

I investigated how Event::NewTestcase { corpus_size, etc} is produced in fuzzer/mod.rs and consumed by the broker in events/simple.rs (via update_corpus_size on the client stats). In that path, corpus_size is 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 both 0 and state.corpus().count() and tested, by adding temporary logging behind SYNC_CORPUS_SIZE flag 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 when corpus_size was 0, the logs showed that SyncFromBrokerStage was the only NewTestcase producer that did not report the real state.corpus().count().Therefore, SyncFromBrokerStage now sends the actual state.corpus().count() as corpus_size, so all NewTestcase events follow the same semantics and future monitoring does not need to special‑case a hardcoded 0.
I can provide that fuzzer if you need.

  • Tested locally via custom fuzzer(I tried using nautilus_sync example in multiclient but during runtime I couldn't see any response,so shifted to creating a different local fuzzer focused on using syncfrombrokerstage)

Checklist

  • I have run ./scripts/precommit.sh and addressed all comments

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.

1 participant