Repository navigation
test(libkernel): cover flexible budget after direct replacements - #6515
Merged
adriadam10 merged 1 commit intoOct 19, 2026
Merged
Conversation
|
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
|
This was referenced Oct 17, 2026
Contributor
|
Heads-up from #7112 (open, mine): partial overlap with this PR - both release flexible budget after direct replacements. #7112 additionally scopes _releaseFlexible to tracked ranges (fixes over-release on munmap of direct/reserved ranges, the TLOU 2^64-wrap direction), covers _mapFlexible release-then-record + ReserveVirtualRange, and pins it in guest_memory. Proposal: whichever lands first, the other rebases (my PR can adopt your _mapDirect helper shape and keep scoping + tests, or vice versa). No action needed now, just flagging to avoid surprise at merge. |
11 tasks done
Ondra97
force-pushed
the
codex/fix-direct-remap-flexible-budget
branch
from
October 18, 2026 08:51
2e889dc to
8627ac7
Compare
12 tasks done
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.
What
I added a limited-budget regression for direct mappings that replace the middle 32 KiB of a 64 KiB flexible mapping through the ordinary, typed, named and batch APIs.
The test checks that failed
MAP_NOOVERWRITEcalls preserve the address, budget and mapped data; successful replacements recover exactly 32 KiB, keep neighboring data intact and report direct memory; recovered capacity can actually be allocated; and releasing direct memory and cleaning up the remaining flexible pages do not release the same budget twice.The production fix landed in #7112. This rebased PR keeps its additional regression coverage and removes the duplicate production changes. Production code is identical to
main. #6491 covers flexible-over-flexible replacements; #6044 moves this test file.Tested
Base
e5c2b3c325e485ba7fd417c47c46f48aa2c89115; head8627ac796583c9db7694c8c324546d39b7bd7016. These are CPU memory/API tests, with no title or performance claim.relinker,libs, including patched libraries) and selected fixtures built successfully. All 15 selected CTests passed with zero skips (3.85 s total; limited-budget regression 0.12 s).libc,libkernel,guest_memory_tests,guest_flexible_memory_budget_tests) passed, followed by all six selected CTests with zero skips. All 16,121 transferred source/dependency SHA-256 hashes matched before the build and after restoration.The focused CTest filter on both platforms includes
guest_memoryand all fiveguest_flexible_memory_*modes. Windows additionally ranpatched_libraries,guest_kernel_sys,guest_memory_pool_stats,guest_jit_shared_memory,guest_addresses,guest_mmap_fixed_anonymous,guest_mprotect_unmapped,guest_page_table_statsandguest_mlock.Linux graphics/Vulkan tests: NOT RUN — intentionally excluded from VirtualBox validation. Native/bare-metal Linux was not tested. Native Linux GPU validation: not tested. The Linux application and unrelated test targets were not built. No GPU execution or retail/homebrew title was tested. Hosted full builds require collaborator dispatch; local results do not replace those jobs.
Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)