Fix Windows test failures due to ArrayPool buffer sizing#1000
Merged
adamhathcock merged 2 commits intoadam/async-rar-aifrom Oct 29, 2025
Merged
Fix Windows test failures due to ArrayPool buffer sizing#1000adamhathcock merged 2 commits intoadam/async-rar-aifrom
adamhathcock merged 2 commits intoadam/async-rar-aifrom
Conversation
Merged
ArrayPool.Rent() can return buffers larger than requested. The tests were using test.Length (the actual buffer size) instead of the requested size (0x1000), causing failures on Windows where ArrayPool returns larger buffers than on Linux. Fixed by: - Using explicit size (0x1000) instead of test.Length in Read() calls - Using test.Take(0x1000) instead of test when comparing arrays Co-authored-by: adamhathcock <527620+adamhathcock@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add Async RAR functionality to the project
Fix Windows test failures due to ArrayPool buffer sizing
Oct 29, 2025
adamhathcock
approved these changes
Oct 29, 2025
This was referenced Nov 28, 2025
This was referenced Dec 8, 2025
This was referenced Dec 15, 2025
This was referenced Dec 22, 2025
This was referenced Dec 29, 2025
This was referenced Jan 5, 2026
This was referenced Jan 12, 2026
This was referenced Jan 19, 2026
This was referenced Jan 26, 2026
This was referenced Feb 13, 2026
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.
Windows tests failed because
ArrayPool<byte>.Shared.Rent()returns buffers larger than requested on Windows but not on Linux. Tests usedtest.Length(actual rented size) instead of the requested size for reads and comparisons.Changes
Read()calls to use explicit size0x1000instead oftest.Length.Take(0x1000)to compare only the requested portion of rented buffersThis aligns with
ArrayPoolcontract: rented buffers may be larger than requested and only the specified portion should be used.💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.