-
-
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
fix WeightedScheduler reporting incorrect queue cylces #2281
fix WeightedScheduler reporting incorrect queue cylces #2281
Conversation
|
||
// TODO deal with corpus_counts decreasing due to removals | ||
if current_cycles >= corpus_counts { | ||
if runs_in_current_cycle >= corpus_counts { | ||
wsmeta.set_runs_current_cycle(0); |
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.
The issue
libafl/src/schedulers/weighted.rs
Outdated
@@ -340,7 +340,7 @@ where | |||
}; | |||
|
|||
// Update depth | |||
if current_cycles > corpus_counts { | |||
if runs_in_current_cycle == corpus_counts { |
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.
i think >= is better? addison added that check because corpus_counts could actually decrease..
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.
what i mean is that you can get corpus_counts decreased by N so runs_in_current_cycle is not necessarily equal to corpus count but you still have to update it.
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.
Ah, makes sense. good catch!
First letter of the PR description should be uppercase in this repo ;) |
Thanks! |
WeightedScheduler would never report a complete cycle since the runs would always be set to zero before it got the chance to surpass the corpus count. This PR fixes it