LATX, fix: Release AOT merge and invalidated segment resources - #473
Merged
LaurenIsACoder merged 1 commit intoSep 13, 2026
Merged
LaurenIsACoder merged 1 commit into
LaurenIsACoder merged 1 commit into
Conversation
LaurenIsACoder
force-pushed
the
latx-aot-memory-ownership
branch
from
September 8, 2026 03:51
9bd53a7 to
b282c15
Compare
This was referenced Sep 8, 2026
LaurenIsACoder
force-pushed
the
latx-aot-memory-ownership
branch
from
September 8, 2026 07:07
b282c15 to
325f9bf
Compare
AOT merging retains input buffers and index allocations after completion or failure. Mapping invalidation only releases the first overlapping segment, leaving other segment-owned cache mappings alive. Release merge inputs and their vector on all exit paths, destroy borrowed indexes before their input buffers, and free owned TB-index values on replacement and destruction. Clean up failed directory scans and invalidate every overlapping segment after successful unmap, remap or replacement. Keep the existing reusable ELF cache policy and cache format unchanged. Add TU/non-TU merge ownership tests and a segment-unmap test using real host mappings. The unfixed production paths fail the ownership checks; the fixed isolated branch passed 27 lat-pr-fast tests. The merge tests stub generated code publication, and unavailable guest integration tests were skipped. Signed-off-by: Hanlu Li <heuleehanlu@gmail.com>
LaurenIsACoder
force-pushed
the
latx-aot-memory-ownership
branch
from
September 13, 2026 06:36
325f9bf to
8047786
Compare
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.
Scope
Based on current upstream
525b456fb5fc. Fix AOT resources whose owning operation has finished:This does not duplicate upstream's AOT reader fix (
17b479de7877) or change the cache format or capacity. Thread ownership changes in #472 remain separate.Validation
Validated on LoongArch64 with GCC 14.2.0. Both configurations used LAT O1, AOT, release settings, enabled tests, and at most two build or test processes.
lat-pr-fast: 31/31 passed.lat-pr-fast: 21/21 passed.target_munmap()with real host mappings. One range removes three segment/cache owners while preserving both neighbors;mincore()verifies the owned mappings were released. Invalid and repeated unmap are covered.git range-diffand stable patch IDs show the rebased commit is equivalent to the previously reviewed commit; author metadata, message, andSigned-off-byare preserved.The current integration suite reports 34 skipped (exit 77): two lack the configured x86_64 guest sysroot, 26 lack Clang, and six lack
x86_64-linux-gnu-gcc. These are not passes. No Wine application acceptance was run, and this PR does not claim full application memory acceptance.