Repository navigation
test(agc): drop a shared range's backing when the range goes away - #5759
Merged
adriadam10 merged 1 commit intoOct 15, 2026
Merged
Conversation
Each SharedRange in agc_host_import_sparse registered a pointer to its Backing in the global list Resolve searches, and never removed it. The ranges live on the stack of each check, so by the last check the list held pointers into stack frames that had been reused. On this machine Resolve matched one of them for the fourth check's range and returned an unrelated descriptor (st_size 0, offset 46330441829925), the sparse path was not chosen, and the check failed with "a failure at vkQueueBindSparse after the sparse path was chosen did not throw". Whether it passes depends on what the compiler leaves in those frames. The range now removes its Backing when it is destroyed. The test passes 20 of 20 here, and fails again when a vkQueueBindSparse failure no longer throws, which it could not show before.
9 tasks done
This was referenced Oct 14, 2026
|
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.
|
Collaborator
|
Checked: |
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
agc_host_import_sparse(added with #5309) fails on my machine onmain:The test's
Resolvecallback searches a globalbackingslist ofBacking*, and eachSharedRangeadds a pointer to its ownBacking. The ranges are locals of each check and nothing removed them from the list, so by the fourth check it held pointers into stack frames that had been reused. With a temporary print increateSparseDmaBufImport, the fourth check's range resolved tooffset=46330441829925and a descriptor withst_size=0. The sparse path was therefore not chosen, the range fell through to the whole-rangeUDMABUF_CREATE(refused above the 64 MiB limit, which logsfalling back to copies), and nothing threw. Whether it passes depends on what the compiler leaves in those frames.SharedRangenow removes itsBackingfrom the list in its destructor. Test-only change;GuestBufferMemory.cppis untouched.Tested
Linux (Bazzite 44, GCC 16.2.1, Ninja, Release,
-DBUILD_TESTING=ON), RX 7700 XT,/dev/udmabufaccessible,size_limit_mb64, based onmain1a40d3d81:agc_host_import_sparse: fails onmain, passes 20 of 20 (--repeat until-fail:20) with this change.if (bound != VK_SUCCESS) return false;in place of thevkQueueBindSparsethrow, the fixed test fails on both of that check's assertions, which the old test could not show here because it never reached that path.tools/check_conventions.py --base upstream/mainandtools/pr_overlap.py(no overlap) pass.Checklist
main; no other open PR implements the same functions.mdfiles or images added to the repository