Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Fix sync for restarted instances #2437

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

Merged
merged 3 commits into from
May 18, 2025
Merged

Fix sync for restarted instances #2437

merged 3 commits into from
May 18, 2025

Conversation

vanhauser-thc
Copy link
Member

No description provided.

@vanhauser-thc vanhauser-thc changed the base branch from stable to dev May 18, 2025 09:04

snprintf(id0, sizeof(id0), "%s/id:000000,*", qd_path);

if (glob(id0, 0, NULL, &glob_result) == 0 && glob_result.gl_pathc == 1 &&
Copy link
Contributor

Choose a reason for hiding this comment

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

Need to globfree

Copy link
Member Author

Choose a reason for hiding this comment

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

ah yes! had never worked with glob() before ...

} else {

// something went wrong - this cannot be right, mabye the instance is
// restarting, skip
Copy link
Contributor

Choose a reason for hiding this comment

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

don't forget to free namelist, goto close_sync probably better.

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 true

min_accept = 0;
ck_write(id_fd, &min_accept, sizeof(u32), qd_synced_path);
close(id_fd);
continue;
Copy link
Contributor

Choose a reason for hiding this comment

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

how about no "continue"; set next_min_accept=0 and let it continue the below sync?

Copy link
Member Author

Choose a reason for hiding this comment

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

then I need another jump point and adding that for just one jump source - I rather do the write instead there.

@@ -816,6 +816,7 @@ void sync_fuzzers(afl_state_t *afl) {
stat(glob_result.gl_pathv[0], &st) == 0) {

// we found exactly one "id:000000,*" file and obtained its mtime
globfree(glob_result);
Copy link
Contributor

Choose a reason for hiding this comment

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

globfree(&glob_result); ?

@kcwu
Copy link
Contributor

kcwu commented May 18, 2025

looks good to me now

@vanhauser-thc vanhauser-thc merged commit 59c2198 into dev May 18, 2025
9 checks passed
@vanhauser-thc vanhauser-thc deleted the fixsync branch May 18, 2025 15:30
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.

2 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.