Fix force-push sync dispatch#525
Open
amattas wants to merge 2 commits into
Open
Conversation
Comments are an address-keyed artifact, not fields on Function, so set_function never carried them and the force-push path dropped them (the long-standing TODO). Snapshot deci.comments once and commit those that fall within each pushed function's address range (matching State.get_func_comments), so manual force push now includes comments. Relies only on deci.comments, so it works against the shipping declib (4.0.1) without depending on comment.func_addr being populated.
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.
Problem
Manual force-push paths updated BinSync's in-memory master state, but they did not reliably flush those changes through the client commit/update path. That made force pushes appear to succeed in the UI while other environments did not receive the changes.
This also exposed two related sync issues:
schedule_job()returned early whenever auto-commit was disabled, which also blocked manual work that still needs to be scheduled explicitly.Function.Solution
_flush_force_push_state()helper and call it after function/global/type/segment force-push updates.Commentartifacts.Verification
conda run -n ghidra python -m pytest tests -q --ignore=tests/test_angr_gui.py->20 passed, 1 warningconda run -n ghidra python -m compileall -q binsync testsgit diff --checkNotes
This branch is clean against upstream
mainand combines the related force-push/comment/scheduler fixes so reviewers do not have to reason about a stacked force-push series.