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 WeightedScheduler reporting incorrect queue cylces #2281

Merged

Conversation

R9295
Copy link
Contributor

@R9295 R9295 commented Jun 6, 2024

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


// 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);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The issue

@@ -340,7 +340,7 @@ where
};

// Update depth
if current_cycles > corpus_counts {
if runs_in_current_cycle == corpus_counts {
Copy link
Member

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..

Copy link
Member

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.

Copy link
Contributor Author

@R9295 R9295 Jun 6, 2024

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!

@R9295 R9295 requested a review from tokatoka June 6, 2024 14:35
@domenukk domenukk merged commit a455ad2 into AFLplusplus:main Jun 6, 2024
98 checks passed
@domenukk
Copy link
Member

domenukk commented Jun 6, 2024

First letter of the PR description should be uppercase in this repo ;)

@domenukk
Copy link
Member

domenukk commented Jun 6, 2024

Thanks!

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