Repository navigation
Conversation
Renumbering a descriptor did not update the global dirent cache, so a later fd_readdir on the target could resume the old directory's stream and return entries from the wrong directory. Drop the cached stream when either endpoint matches the cached descriptor, and add a p1 test that reproduces the stale-stream case. Closes bytecodealliance#15327.
MeGaurav4
requested review from
pchickey and
rvolosatovs
and removed request for
a team
November 27, 2026 05:04
This branch has not been deployed
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.
Renumbering a descriptor left the adapter's global
dirent_cacheattached to the old descriptor. A laterfd_readdiron the target could resume the stale stream and return entries from the wrong directory. The cache is now dropped when either renumber endpoint matches the cached descriptor, with a regression case in thep1_renumbertest program.Closes #15327
Verification
cargo check -p wasi-preview1-component-adapter: passescargo check -p test-programs --bin p1_renumber --target wasm32-wasip1: passescargo fmt --check: clean