Repository navigation
fix(agc): hand out repeated low test mappings under ASan - #21249
Conversation
The low-memory helpers of agc_gcn_color_target and the EQAA execution test mapped their block at the first hint that was free and, on the next call, retried that same hint and then stepped by 4 GiB. With ASan every address at or above 0x7fff8000 belongs to its shadow, so the first block at 0x60000000 succeeded and every later attempt failed: the 2026-11-15 Sanitizers run stopped in agc_gcn_color_target with "cannot allocate multisampled array slice test memory below 1 TiB". Both helpers now keep the next free hint and step by the page-rounded block size while ASan is enabled, so consecutive blocks pack into the gap below its shadow. Without ASan the 4 GiB stride is kept.
MarcZX10
left a comment
There was a problem hiding this comment.
Reviewed — looks good
The reviewed changes safely advance the low-memory mapping hint by each page-rounded allocation size, allowing consecutive mappings to fit below the GCN 40-bit address limit under ASan.
What I ran
Reviewed head d17aed4439ac4dd3e8de9545e9f5f064b5170453. I read the prepared description, commits, manifest and diff, plus the full text of both changed files. I did not run tests or build commands; the checks described in the PR are author-reported.
Results
| Check | Result | Note |
|---|---|---|
| Code review | passed | Both changed helpers inspected |
| Build and tests | not run | PR reports local runs |
| Other changed files | not applicable | Both reviewed files were read |
Findings
Blocking
None.
Non-blocking
None.
Not verified
I did not run the reported sanitizer or normal builds, GPU execution test, conventions check, or PR overlap check. No files were excluded by rule in the supplied manifest.
To get this to a good state
Nothing is required.
|
Windows + NVIDIA result for head Host: Windows 11 26300, Intel i7-12700K, NVIDIA GeForce RTX 2070 SUPER, WinLibs GCC 15.2.0 (x86_64-ucrt-posix-seh, r6), Release, Validation-layer protocol on
The tests this PR adds or changes ( AI-assisted: yes (Claude Code), the runs and the numbers above are from this machine. |
|
Windows + AMD run; I found no AMD run in the description or in the comments. Head Setup: Windows 11 25H2 (build 26200), AMD Radeon 760M integrated graphics (
AI-assisted: yes (build and runs scripted with an AI assistant, on the hardware above). |
|
Ran the two GCN color target tests from the description on NVIDIA's proprietary Linux driver with the Khronos validation layer; the description's Vulkan run is on NVIDIA Linux but names no validation-layer run, and the comments have Windows runs only. Setup: Arch Linux (kernel 7.3.4), GCC 16.2.1, Release (no ASan), NVIDIA GeForce RTX 4090 (vendor
No new AI-assisted: yes (Claude Code) |
|
Head No new failures and no new validation messages on either GPU.
Layer runs used AI-assisted: yes |
|
Tested head Setup: Windows 11 Pro 10.0.26200, Ryzen 7 9800X3D, WinLibs GCC 15.2.0 r7, Release,
Whole batch: the full This is one combined tree, not a run of this PR alone. AI-assisted: yes (Claude Code) |
What
agc_gcn_color_targetand the EQAA execution test map their blocks below 1 TiB so the PS4 40-bit address space holds them. Their helpers took the first free hint (0x60000000with ASan,1 << 32otherwise) and, on the next call, tried that same hint again and then stepped by 4 GiB.Under ASan every address at or above
0x7fff8000belongs to its shadow, so only the first block fits: the second call walked the 4 GiB hints into the shadow and returned null. That is the 2026-11-15 Sanitizers failure inagc_gcn_color_target(cannot allocate multisampled array slice test memory below 1 TiB), andGcnEqaaColorTarget.cppcarries the same pattern for its secondLowBlock.Both helpers now keep the next free hint and step by the page-rounded block size while
ANYPS5_ENABLE_ASANis set, so consecutive blocks pack into the gap below the shadow; without ASan they keep the 4 GiB stride.Tested
Linux x86-64 (CachyOS), GCC 16.2.1, Release.
agc_gcn_color_target_testsin an-DANYPS5_ENABLE_ASAN=ONbuild: fails with that exact message before the change and passes after it, from the same build directory.0x60000000and then null, the new one returns three consecutive mappings.agc_gcn_color_target(CPU only) andagc_driver_gcn_eqaa_color_target(Vulkan, NVIDIA GeForce RTX 4080 SUPER, driver 615.78.8.0) pass.python3 tools/check_conventions.py --base origin/main: 0 errors.python3 tools/pr_overlap.py --branch fix/agc-low-memory-asan --jobs 32: no overlap with the open pull requests.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)