sidecar: Clear the response buffer before running - #4071
Draft
smalis-msft wants to merge 1 commit into
Draft
Conversation
|
This PR modifies files containing For more on why we check whole files, instead of just diffs, check out the Rustonomicon |
Contributor
There was a problem hiding this comment.
Pull request overview
This change fixes a subtle correctness issue in the sidecar VP run path: previously, run() attempted to “clear” the command buffer by writing a () input, but () is zero-sized and therefore doesn’t overwrite any bytes in the shared command page. The update ensures the shared buffer is actually written before starting the VP, preventing stale data from being interpreted as a new RUN_VP result.
Changes:
- Write a 1-byte, harmless value (
RunVpResponse { intercept: 0 }) into the command page before issuingRUN_VP. - Preserve existing
wait()semantics (intercept != 0) while ensuring the output byte is deterministically initialized.
smalis-msft
marked this pull request as draft
July 30, 2026 14:57
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.
Setting this value to
()doesn't actually write anything, as unit is zero sized. Instead, set the value to something sized but harmless, in this case a RunVpResponse indicating a spurious exit with no real intercept.