Memory: link xcl.exe without high-entropy ASLR so title memory stays under 2^40 #631

Closed
github-bot wants to merge 1 commit from gh-pr/631/head into gh-pr/631/base
Owner

@⁠13hourstilliland on GitHub · 2026-11-24 02:41 UTC · original
13hourstilliland:memory-low-va → main · +30 −0 · 2 files · 1 commits · closed without merging

Part of #585. A retail title's XboxBvhBuilder refuses any acceleration structure whose GPU address is at or above 2^40. @⁠sub-north's addresses in #585 are about 2.06 TiB, in write-watched reservations that go through VirtualAlloc(NULL).

The reason they are that high: xcl.exe is linked with high-entropy VA (Rust's default), and with it Windows places a process's bottom-up allocations around 1 to 2.5 TiB. The title's memory lives in that process. Linking xcl.exe without it brings those allocations back near 2 GiB. That should also cover the fallbacks @⁠sub-north found the VirtualAlloc2 ceiling could not catch, with no change in crates/xcl/src.

What is in it

  • crates/xcl/build.rs (new): /HIGHENTROPYVA:NO (MSVC) or -Wl,--disable-high-entropy-va (GNU) for the xcl binary only.
  • crates/xcl/tests/low_va.rs (new): reads xcl.exe's PE header and fails if the high-entropy VA flag is set.

Tested

  • RTX 3070 (driver 32.0.16.1088), i5-12600K, Windows 11 26200, rustc 1.100.0 x86_64-pc-windows-gnu (not MSVC), debug.
  • What the flag changes, measured with a small probe linked both ways (VirtualAlloc(NULL, 24 GiB, MEM_RESERVE) ×20, three runs each):
    • default: first reservation at 0x1e1cb8a0000, 0x1eda2c40000 and 0x23344380000; 20/20 above 2^40 in every run
    • --disable-high-entropy-va: from 0x7fff0000 up; 0/20 above 2^40
  • cargo test -p xcl --test low_va: fails on main with DllCharacteristics 0x160: high-entropy VA is on; passes with this change (0x140).
  • cargo test --workspace --no-fail-fast -- --test-threads=4 in an interactive session: 686 passed, 0 failed, 41 ignored, the e2e title test included. The same tree on main cb868b2 plus these two files.
  • SKIPPED printed: gpu_geometry_wave32_prefix_count_over_a_mask (no wave64). A Session 0 run of the same tree also printed gpu_wave32_program_in_wave64_hardware (no wave64).

Regression run
None. I do not have a retail title. scripts/pr_check.py does not ask for one here because nothing under crates/xcl/src changes, but the change affects where every allocation in the process lands, so a smoke run is the real check. @⁠sub-north, you hit this wall: would you run smoke.ps1 on main and on this head?

Not tested

  • MSVC link (/HIGHENTROPYVA:NO is a standard link.exe switch, but I built with GNU only).
  • The retail title, and whether the BVH builder passes afterwards.
  • Allocations a title asks for with MEM_TOP_DOWN still go to the top of the address space. This change does not cover them.
  • On a target dir that had already built xcl.exe, one of my workspace runs kept a stale binary with the flag still set. cargo clean -p xcl fixed it, and every later run was consistent.

AI use
Claude Code (Claude Opus 5.5): found the cause, wrote the change and the test, ran the probe and the tests on the PC above, and wrote this description.

**@⁠13hourstilliland** on GitHub · 2026-11-24 02:41 UTC · [original](https://github.com/xcl-dev/xcl/pull/631) `13hourstilliland:memory-low-va` → `main` · +30 −0 · 2 files · 1 commits · closed without merging Part of #585. A retail title's XboxBvhBuilder refuses any acceleration structure whose GPU address is at or above 2^40. @⁠sub-north's addresses in #585 are about 2.06 TiB, in write-watched reservations that go through `VirtualAlloc(NULL)`. The reason they are that high: `xcl.exe` is linked with high-entropy VA (Rust's default), and with it Windows places a process's bottom-up allocations around 1 to 2.5 TiB. The title's memory lives in that process. Linking `xcl.exe` without it brings those allocations back near 2 GiB. That should also cover the fallbacks @⁠sub-north found the `VirtualAlloc2` ceiling could not catch, with no change in `crates/xcl/src`. **What is in it** - `crates/xcl/build.rs` (new): `/HIGHENTROPYVA:NO` (MSVC) or `-Wl,--disable-high-entropy-va` (GNU) for the `xcl` binary only. - `crates/xcl/tests/low_va.rs` (new): reads `xcl.exe`'s PE header and fails if the high-entropy VA flag is set. **Tested** - RTX 3070 (driver 32.0.16.1088), i5-12600K, Windows 11 26200, rustc 1.100.0 `x86_64-pc-windows-gnu` (not MSVC), debug. - What the flag changes, measured with a small probe linked both ways (`VirtualAlloc(NULL, 24 GiB, MEM_RESERVE)` ×20, three runs each): - default: first reservation at `0x1e1cb8a0000`, `0x1eda2c40000` and `0x23344380000`; 20/20 above 2^40 in every run - `--disable-high-entropy-va`: from `0x7fff0000` up; 0/20 above 2^40 - `cargo test -p xcl --test low_va`: fails on `main` with `DllCharacteristics 0x160: high-entropy VA is on`; passes with this change (`0x140`). - `cargo test --workspace --no-fail-fast -- --test-threads=4` in an interactive session: **686 passed, 0 failed, 41 ignored**, the e2e title test included. The same tree on `main` `cb868b2` plus these two files. - SKIPPED printed: `gpu_geometry_wave32_prefix_count_over_a_mask` (no wave64). A Session 0 run of the same tree also printed `gpu_wave32_program_in_wave64_hardware` (no wave64). **Regression run** None. I do not have a retail title. `scripts/pr_check.py` does not ask for one here because nothing under `crates/xcl/src` changes, but the change affects where every allocation in the process lands, so a smoke run is the real check. @⁠sub-north, you hit this wall: would you run `smoke.ps1` on `main` and on this head? **Not tested** - MSVC link (`/HIGHENTROPYVA:NO` is a standard link.exe switch, but I built with GNU only). - The retail title, and whether the BVH builder passes afterwards. - Allocations a title asks for with `MEM_TOP_DOWN` still go to the top of the address space. This change does not cover them. - On a target dir that had already built `xcl.exe`, one of my workspace runs kept a stale binary with the flag still set. `cargo clean -p xcl` fixed it, and every later run was consistent. **AI use** Claude Code (Claude Opus 5.5): found the cause, wrote the change and the test, ran the probe and the tests on the PC above, and wrote this description.
A retail title's XboxBvhBuilder refuses an acceleration structure whose
GPU address has a bit at or above 40 set (#585: "DestAccelerationStructureData
can not have more than 40b of address set", then 0xe06d7363). The failing
addresses reported there are about 2.06 TiB, in write-watched title
reservations that go through VirtualAlloc(NULL).

Root cause: Rust links xcl.exe with high-entropy VA on, and with it Windows
puts a process's bottom-up allocations (heaps, stacks, VirtualAlloc(NULL))
around 1-2.5 TiB. Measured on Windows 11 26200 with a small probe linked
both ways: twenty 24 GiB reservations landed at 0x1e1cb8a0000 and up
(20/20 above 2^40, three runs); with --disable-high-entropy-va they landed
from 0x7fff0000 up (0/20 above 2^40). The title's memory follows, since it
lives in xcl.exe's process.

build.rs passes /HIGHENTROPYVA:NO (MSVC) or --disable-high-entropy-va
(GNU) to the xcl binary only; the library and test binaries are unchanged.
tests/low_va.rs checks the flag in xcl.exe's PE header.

Not covered: allocations the title asks for with MEM_TOP_DOWN still go to
the top of the address space.

Assisted-by: Claude Code (Claude Opus 5.5)
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:27:50 +00:00
github-bot closed this pull request 2026-11-26 04:27:50 +00:00
Author
Owner

@⁠LocranKing on GitHub · 2026-11-24 03:08 UTC · original

Tested the MSVC build (x86_64-pc-windows-msvc) and retail smoke run on NVIDIA RTX 3060 Ti.

Tested

  • Commit: 12be9306269772e1e24aa1e44219f2bce684c193 (pr-631, clean tree; cargo clean -p xcl before building)
  • Hardware / software: Windows 11 Home Build 26200, Ryzen 5 5500, 31.8 GB RAM, RTX 3060 Ti (8024 MiB VRAM, driver 32.0.16.2101), rustc 1.100.0 (x86_64-pc-windows-msvc, MSVC 14.44.35207), DXC 1.9.2602.17 (SDK 10.0.26100.0), --release
  • cargo test --release -p xcl --test low_va: 1 passed, 0 failed (xcl_exe_is_linked_without_high_entropy_va ... ok)
  • cargo test --workspace --release --no-fail-fast -- --test-threads=4: 686 passed, 0 failed, 41 ignored, exit 0; 2 (no wave64) skipped (gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware)
  • Relocation / VA check in xcl.log on the retail smoke run: all relocated console DLLs and UMA windows landed well below 2^40 (e.g. vcruntime140.dll @ 0x16d0000, xboxbvhbuilder.dll @ 0xa6a0000, libhttpclient.gdk.dll @ 0xa780000, window 0 buffer at VA 0x300000000, coherent window at 0x400000000, console buffers 0x700010000).

Regression run (scripts/smoke.ps1, 60 s, XCL_NETWORK=0, title folder name redacted)

main (dd2ae9a):

xcl-smoke v1
commit: dd2ae9a70af5eb5aad60f02d86e386b72abe1e95
gpu: NVIDIA GeForce RTX 3060 Ti
title: retail-1.0.2.1
seconds: 60
exit: 0x0
frames shown: 1525 (PresentX 1525)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14720 MB

PR #631 (12be930):

xcl-smoke v1
commit: 12be9306269772e1e24aa1e44219f2bce684c193
gpu: NVIDIA GeForce RTX 3060 Ti
title: retail-1.0.2.1
seconds: 60
exit: 0x0
frames shown: 815 (PresentX 816)
presents per 2 s (last 3): 25 26 25
device removals: 0
crashes: 0
peak commit: 15654 MB

(Note on the lower frame count: #631 is branched off an older main before #636/#602, and during this run free system commit was 17342 MB < 17408 MB, so XCL kept a 512 MB coherent window.)

Not tested: World streaming / live XboxBvhBuilder calls past the start screen, debug build, GNU target.

AI use: Antigravity (Gemini 4 Hydrogen) ran the builds, tests, and smoke run and drafted this report from the actual command outputs and logs.

**@⁠LocranKing** on GitHub · 2026-11-24 03:08 UTC · [original](https://github.com/xcl-dev/xcl/pull/631#issuecomment-7120811896) Tested the **MSVC** build (`x86_64-pc-windows-msvc`) and retail smoke run on NVIDIA RTX 3060 Ti. **Tested** - Commit: `12be9306269772e1e24aa1e44219f2bce684c193` (`pr-631`, clean tree; `cargo clean -p xcl` before building) - Hardware / software: Windows 11 Home Build 26200, Ryzen 5 5500, 31.8 GB RAM, RTX 3060 Ti (`8024 MiB VRAM`, driver `32.0.16.2101`), `rustc 1.100.0` (`x86_64-pc-windows-msvc`, MSVC `14.44.35207`), DXC `1.9.2602.17` (SDK `10.0.26100.0`), `--release` - `cargo test --release -p xcl --test low_va`: **1 passed, 0 failed** (`xcl_exe_is_linked_without_high_entropy_va ... ok`) - `cargo test --workspace --release --no-fail-fast -- --test-threads=4`: **686 passed, 0 failed, 41 ignored**, exit `0`; `2 (no wave64)` skipped (`gpu_geometry_wave32_prefix_count_over_a_mask`, `gpu_wave32_program_in_wave64_hardware`) - Relocation / VA check in `xcl.log` on the retail smoke run: all relocated console DLLs and UMA windows landed well below `2^40` (e.g. `vcruntime140.dll @ 0x16d0000`, `xboxbvhbuilder.dll @ 0xa6a0000`, `libhttpclient.gdk.dll @ 0xa780000`, `window 0 buffer at VA 0x300000000`, coherent window at `0x400000000`, console buffers `0x700010000`). **Regression run** (`scripts/smoke.ps1`, 60 s, `XCL_NETWORK=0`, title folder name redacted) main (`dd2ae9a`): ``` xcl-smoke v1 commit: dd2ae9a70af5eb5aad60f02d86e386b72abe1e95 gpu: NVIDIA GeForce RTX 3060 Ti title: retail-1.0.2.1 seconds: 60 exit: 0x0 frames shown: 1525 (PresentX 1525) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14720 MB ``` PR #631 (`12be930`): ``` xcl-smoke v1 commit: 12be9306269772e1e24aa1e44219f2bce684c193 gpu: NVIDIA GeForce RTX 3060 Ti title: retail-1.0.2.1 seconds: 60 exit: 0x0 frames shown: 815 (PresentX 816) presents per 2 s (last 3): 25 26 25 device removals: 0 crashes: 0 peak commit: 15654 MB ``` *(Note on the lower frame count: `#631` is branched off an older `main` before `#636`/`#602`, and during this run free system commit was `17342 MB` < `17408 MB`, so XCL kept a 512 MB coherent window.)* **Not tested:** World streaming / live `XboxBvhBuilder` calls past the start screen, debug build, GNU target. **AI use:** Antigravity (`Gemini 4 Hydrogen`) ran the builds, tests, and smoke run and drafted this report from the actual command outputs and logs.
Author
Owner

@⁠Chrysana on GitHub · 2026-11-24 03:33 UTC · original

Test report for 12be931 on AMD RDNA4 with the retail title, which is the card in #586: with this PR, the acceleration-structure addresses the title hands its BVH builder are under 2^40; on main they are all above it. The runs below didn't reach the builder's check itself (see the last point under Long runs).

Setup: AMD Radeon RX 9070 XT 16 GB, driver 32.0.32015.2008, Ryzen 7 9800X3D, 31 GB RAM, Windows 11 25H2 build 26200.9974, rustc 1.100.0 x86_64-pc-windows-msvc, DXC 1.9.2602.17. Retail title 1.0.2.1, XCL_NETWORK=0. Debug build for the tests, release builds for the runs.

The link flag (MSVC):

  • xcl.exe DllCharacteristics: main 63cdc25 = 0x8160 (high-entropy VA on); 12be931 = 0x8140 (off).
  • cargo test --workspace --no-fail-fast -- --test-threads=4 at 12be931: 686 passed, 0 failed, 41 ignored; xcl_exe_is_linked_without_high_entropy_va passes. SKIPPED: the two debug-layer tests (the D3D12 debug layer isn't installed here).
  • Negative control: this PR's tests/low_va.rs alone on main 63cdc25 (without build.rs) fails with DllCharacteristics 0x8160: high-entropy VA is on.

Where the title's memory lands (from xcl.log; 2^40 = 0x100_0000_0000):

main this PR
the 24 GiB reservation (kernelx: reservation … 0x600000000 bytes) a different place each run, ≥ 2^40 in all 4: 0x149e4010000, 0x1d97c850000, 0x285e2a60000, 0x2a6ffec0000 0xd20000000 in all 5 runs
kept-in-step texture sources all above 2^40 (14/14, 16/16) all below (0/14, 0/16)
CreateShaderResourceView(RAYTRACING_ACCELERATION_STRUCTURE) addresses 4/4 above, 0x1dfda360000–0x1dfdd946f00 4/4 below, 0x1947a0000–0x197d81d00

Long runs (240 s, XCL_PRESS_A_AT=20,25,30, main 63cdc25 and this PR's head):

  • Both get past the intro video and stream (about 85,000 DirectStorage requests each). On main the acceleration structures are set up at the high addresses above, as in #586 / #585.
  • Neither run reached the BVH builder's check. No XDXR Error line in either. Both end in the title's GPU watchdog first (0xc0000005 write of 0 at +0x23cf683, the deliberate stop from #505 / #534): main at 163.6 s, this PR at 153.7 s, with presents falling to 0 beforehand in both. So these runs show the addresses fixed, not the throw avoided.

Regression run: scripts/smoke.ps1 -Game <folder> -Seconds 60, XCL_PRESS_A_AT=14,17,21, same saved state, two rounds. This PR is 15 commits behind main, so it was also merged onto main 63cdc25 (clean, local merge 52de9e9, not pushed):

build frames peak commit
main 63cdc25 1183, 1176 17197, 17135 MB
12be931 merged onto 63cdc25 1174, 1189 17130, 17201 MB
12be931 (its own base cb868b2) 1566 17417 MB

All runs reached the intro video; no crash or device removal.

main:

xcl-smoke v1
commit: 63cdc25bc0d2b59cc2af85e6e23f619dfaf72866
gpu: AMD Radeon RX 9070 XT
title: retail-title
seconds: 60
exit: 0x0
frames shown: 1183 (PresentX 1184)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 17197 MB

PR merged onto main:

xcl-smoke v1
commit: 52de9e99b37c0f6bb2b5d2766563b5bb43b2fee8
gpu: AMD Radeon RX 9070 XT
title: retail-title
seconds: 60
exit: 0x0
frames shown: 1174 (PresentX 1174)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 17130 MB

PR head:

xcl-smoke v1
commit: 12be9306269772e1e24aa1e44219f2bce684c193
gpu: AMD Radeon RX 9070 XT
title: retail-title
seconds: 60
exit: 0x0
frames shown: 1566 (PresentX 1566)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 17417 MB

Not tested: the BVH builder's check passing (the watchdog stops both runs first); MEM_TOP_DOWN allocations; the low-commit fallback from #586's log (UMA: … under 17408 MB), which this machine didn't hit in these runs.

AI use: Claude Code with Claude Opus 5.5 built the commits, ran the tests, the negative control and the title runs, read the logs, and wrote this report. The runs were made on my machine.

**@⁠Chrysana** on GitHub · 2026-11-24 03:33 UTC · [original](https://github.com/xcl-dev/xcl/pull/631#issuecomment-7121209232) Test report for `12be931` on **AMD RDNA4** with the retail title, which is the card in #586: **with this PR, the acceleration-structure addresses the title hands its BVH builder are under 2^40; on `main` they are all above it.** The runs below didn't reach the builder's check itself (see the last point under **Long runs**). **Setup:** AMD Radeon RX 9070 XT 16 GB, driver 32.0.32015.2008, Ryzen 7 9800X3D, 31 GB RAM, Windows 11 25H2 build 26200.9974, rustc 1.100.0 **`x86_64-pc-windows-msvc`**, DXC 1.9.2602.17. Retail title 1.0.2.1, `XCL_NETWORK=0`. Debug build for the tests, release builds for the runs. **The link flag (MSVC):** - `xcl.exe` `DllCharacteristics`: `main` `63cdc25` = `0x8160` (high-entropy VA on); `12be931` = `0x8140` (off). - `cargo test --workspace --no-fail-fast -- --test-threads=4` at `12be931`: 686 passed, 0 failed, 41 ignored; `xcl_exe_is_linked_without_high_entropy_va` passes. `SKIPPED`: the two debug-layer tests (the D3D12 debug layer isn't installed here). - **Negative control:** this PR's `tests/low_va.rs` alone on `main` `63cdc25` (without `build.rs`) fails with `DllCharacteristics 0x8160: high-entropy VA is on`. **Where the title's memory lands** (from `xcl.log`; 2^40 = `0x100_0000_0000`): | | `main` | this PR | |---|---|---| | the 24 GiB reservation (`kernelx: reservation … 0x600000000 bytes`) | a different place each run, ≥ 2^40 in all 4: `0x149e4010000`, `0x1d97c850000`, `0x285e2a60000`, `0x2a6ffec0000` | `0xd20000000` in all 5 runs | | kept-in-step texture sources | all above 2^40 (14/14, 16/16) | all below (0/14, 0/16) | | `CreateShaderResourceView(RAYTRACING_ACCELERATION_STRUCTURE)` addresses | 4/4 above, `0x1dfda360000`–`0x1dfdd946f00` | 4/4 below, `0x1947a0000`–`0x197d81d00` | **Long runs** (240 s, `XCL_PRESS_A_AT=20,25,30`, `main` `63cdc25` and this PR's head): - Both get past the intro video and stream (about 85,000 DirectStorage requests each). On `main` the acceleration structures are set up at the high addresses above, as in #586 / #585. - **Neither run reached the BVH builder's check.** No `XDXR Error` line in either. Both end in the title's GPU watchdog first (`0xc0000005` write of 0 at `+0x23cf683`, the deliberate stop from #505 / #534): `main` at 163.6 s, this PR at 153.7 s, with presents falling to 0 beforehand in both. So these runs show the addresses fixed, not the throw avoided. **Regression run:** `scripts/smoke.ps1 -Game <folder> -Seconds 60`, `XCL_PRESS_A_AT=14,17,21`, same saved state, two rounds. This PR is 15 commits behind `main`, so it was also merged onto `main` `63cdc25` (clean, local merge `52de9e9`, not pushed): | build | frames | peak commit | |---|---|---| | `main` `63cdc25` | 1183, 1176 | 17197, 17135 MB | | **`12be931` merged onto `63cdc25`** | **1174, 1189** | 17130, 17201 MB | | `12be931` (its own base `cb868b2`) | 1566 | 17417 MB | All runs reached the intro video; no crash or device removal. `main`: ``` xcl-smoke v1 commit: 63cdc25bc0d2b59cc2af85e6e23f619dfaf72866 gpu: AMD Radeon RX 9070 XT title: retail-title seconds: 60 exit: 0x0 frames shown: 1183 (PresentX 1184) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 17197 MB ``` PR merged onto `main`: ``` xcl-smoke v1 commit: 52de9e99b37c0f6bb2b5d2766563b5bb43b2fee8 gpu: AMD Radeon RX 9070 XT title: retail-title seconds: 60 exit: 0x0 frames shown: 1174 (PresentX 1174) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 17130 MB ``` PR head: ``` xcl-smoke v1 commit: 12be9306269772e1e24aa1e44219f2bce684c193 gpu: AMD Radeon RX 9070 XT title: retail-title seconds: 60 exit: 0x0 frames shown: 1566 (PresentX 1566) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 17417 MB ``` **Not tested:** the BVH builder's check passing (the watchdog stops both runs first); `MEM_TOP_DOWN` allocations; the low-commit fallback from #586's log (`UMA: … under 17408 MB`), which this machine didn't hit in these runs. **AI use:** Claude Code with Claude Opus 5.5 built the commits, ran the tests, the negative control and the title runs, read the logs, and wrote this report. The runs were made on my machine.
Author
Owner

@⁠RomeXDR on GitHub · 2026-11-24 04:04 UTC · original

Test report for 12be930: the BVH builder's check passes with the retail title (1.0.2.1). That's the case the runs above list as not tested, since their runs didn't reach it. On this machine main reaches the check and throws on every run.

Setup: RTX 4070, Ryzen 7 7800X3D, 32 GB RAM, Windows 11, rustc 1.100.0 (MSVC), release build, XCL_NETWORK=0, XCL_PRESS_A_AT=20,25,30.

On main (3 runs): every run threw from XboxBvhBuilder.dll, with D3D12 XDXR Error: DestAccelerationStructureData can not have more than 40b of address set, right after index buffer at … (96 bytes) is outside unified memory … mirrored. The RAYTRACING_ACCELERATION_STRUCTURE addresses were above 2^40 (0x259919a0000, 0x2599375fb00, 0x1d294723500).

With this PR:

The RAYTRACING_ACCELERATION_STRUCTURE addresses are below 2^40: 0x1947a0000, 0x196562400, 0x1974fc000, 0x197d84800. Kept-in-step textures are also low (0x1128d06000, 0x12e222c000).
No XDXR Error. The same index buffer … (96 bytes) … mirrored line appears, then about 50 more translated compute PSOs, past the point where main threw.
The run then ends in the title's GPU watchdog (0xc0000005 in game_scarlett_master.exe+0x23cf683, write at 0x0), as in #505 / #534 and the RDNA4 runs above. Not related to this PR.

Not tested: smoke.ps1 regression runs, a debug build.

AI use: Claude helped read the logs and drafted this report. The builds and runs were done on my machine.

**@⁠RomeXDR** on GitHub · 2026-11-24 04:04 UTC · [original](https://github.com/xcl-dev/xcl/pull/631#issuecomment-7121675827) Test report for 12be930: the BVH builder's check passes with the retail title (1.0.2.1). That's the case the runs above list as not tested, since their runs didn't reach it. On this machine main reaches the check and throws on every run. Setup: RTX 4070, Ryzen 7 7800X3D, 32 GB RAM, Windows 11, rustc 1.100.0 (MSVC), release build, XCL_NETWORK=0, XCL_PRESS_A_AT=20,25,30. On main (3 runs): every run threw from XboxBvhBuilder.dll, with D3D12 XDXR Error: DestAccelerationStructureData can not have more than 40b of address set, right after index buffer at … (96 bytes) is outside unified memory … mirrored. The RAYTRACING_ACCELERATION_STRUCTURE addresses were above 2^40 (0x259919a0000, 0x2599375fb00, 0x1d294723500). With this PR: The RAYTRACING_ACCELERATION_STRUCTURE addresses are below 2^40: 0x1947a0000, 0x196562400, 0x1974fc000, 0x197d84800. Kept-in-step textures are also low (0x1128d06000, 0x12e222c000). No XDXR Error. The same index buffer … (96 bytes) … mirrored line appears, then about 50 more translated compute PSOs, past the point where main threw. The run then ends in the title's GPU watchdog (0xc0000005 in game_scarlett_master.exe+0x23cf683, write at 0x0), as in #505 / #534 and the RDNA4 runs above. Not related to this PR. Not tested: smoke.ps1 regression runs, a debug build. AI use: Claude helped read the logs and drafted this report. The builds and runs were done on my machine.
Author
Owner

@⁠anes66 on GitHub · 2026-11-24 04:15 UTC · original

Verified 12be9306269772e1e24aa1e44219f2bce684c193 with MSVC on Windows 10 Pro (build 19045), Ryzen 7 9800X3D and RTX 3060 12 GB (driver 32.0.16.2114).

Tested

  • Rust/Cargo 1.100.0, MSVC 14.52.37025, debug build, DXC 1.9.2602.17, Agility SDK 1.620.2.
  • cargo build --locked --workspace -j 4: passed.
  • cargo test --locked --workspace --no-fail-fast -j 4 -- --test-threads=4 --show-output: 686 passed, 0 failed, 41 ignored. The new low_va test and synthetic title e2e tests passed.
  • Two GPU tests reported SKIPPED for lack of native wave64: gpu_geometry_wave32_prefix_count_over_a_mask and gpu_wave32_program_in_wave64_hardware. These are included in the passed count. All XCL_SAMPLE_* variables were unset, so sample-gated early returns do not establish coverage of game data.
  • The PR's MSVC-built xcl.exe has DllCharacteristics 0x8140; main f4ce27ceb6d1b0576d0c659b713b674778bf1968 built here had 0x8160. HIGH_ENTROPY_VA is cleared; DYNAMIC_BASE and NX_COMPAT remain set.
  • An independent MSVC C probe reserved twenty 24 GiB regions using VirtualAlloc(NULL, ..., MEM_RESERVE, PAGE_NOACCESS). With /HIGHENTROPYVA: 20/20 addresses were above 2^40 (first 0x1f9b6fc0000). With /HIGHENTROPYVA:NO: 0/20 were above it (first 0x7fff0000). Reservations were released; no pages were committed.

Not tested
Retail title smoke runs, XboxBvhBuilder progression, MEM_TOP_DOWN, release builds or GNU. The workspace run used this exact PR head, not a merge with current main. The standalone probe supports the allocation-placement explanation; it does not prove all title allocations will stay below 2^40.

AI use
Codex (GPT-6; exact variant unavailable) inspected the patch, ran the MSVC build and tests, wrote and ran the independent allocation probe, and drafted this report.

**@⁠anes66** on GitHub · 2026-11-24 04:15 UTC · [original](https://github.com/xcl-dev/xcl/pull/631#issuecomment-7121851050) Verified `12be9306269772e1e24aa1e44219f2bce684c193` with MSVC on Windows 10 Pro (build 19045), Ryzen 7 9800X3D and RTX 3060 12 GB (driver 32.0.16.2114). **Tested** - Rust/Cargo 1.100.0, MSVC 14.52.37025, debug build, DXC 1.9.2602.17, Agility SDK 1.620.2. - `cargo build --locked --workspace -j 4`: passed. - `cargo test --locked --workspace --no-fail-fast -j 4 -- --test-threads=4 --show-output`: 686 passed, 0 failed, 41 ignored. The new low_va test and synthetic title e2e tests passed. - Two GPU tests reported SKIPPED for lack of native wave64: `gpu_geometry_wave32_prefix_count_over_a_mask` and `gpu_wave32_program_in_wave64_hardware`. These are included in the passed count. All XCL_SAMPLE_* variables were unset, so sample-gated early returns do not establish coverage of game data. - The PR's MSVC-built xcl.exe has DllCharacteristics `0x8140`; main `f4ce27ceb6d1b0576d0c659b713b674778bf1968` built here had `0x8160`. HIGH_ENTROPY_VA is cleared; DYNAMIC_BASE and NX_COMPAT remain set. - An independent MSVC C probe reserved twenty 24 GiB regions using VirtualAlloc(NULL, ..., MEM_RESERVE, PAGE_NOACCESS). With /HIGHENTROPYVA: 20/20 addresses were above 2^40 (first `0x1f9b6fc0000`). With /HIGHENTROPYVA:NO: 0/20 were above it (first `0x7fff0000`). Reservations were released; no pages were committed. **Not tested** Retail title smoke runs, XboxBvhBuilder progression, MEM_TOP_DOWN, release builds or GNU. The workspace run used this exact PR head, not a merge with current main. The standalone probe supports the allocation-placement explanation; it does not prove all title allocations will stay below 2^40. **AI use** Codex (GPT-6; exact variant unavailable) inspected the patch, ran the MSVC build and tests, wrote and ran the independent allocation probe, and drafted this report.
Author
Owner

@⁠maephisto666 on GitHub · 2026-11-24 08:59 UTC · original

Test report: MSVC toolchain, and a retail run of #585's crash with and without this change.

Rebase note. The PR no longer applies to main (09940bb): main gained its own crates/xcl/build.rs in #762 (translator source hash). I tested the PR's linker flag added to main's build.rs (inside its main(), after the XCL_TRANSLATOR_SOURCE_ID line), plus tests/low_va.rs unchanged:

    match std::env::var("CARGO_CFG_TARGET_ENV").as_deref() {
        Ok("msvc") => println!("cargo:rustc-link-arg-bin=xcl=/HIGHENTROPYVA:NO"),
        Ok("gnu") => println!("cargo:rustc-link-arg-bin=xcl=-Wl,--disable-high-entropy-va"),
        _ => {}
    }

Tested

  • RTX 5090 (driver 32.0.16.2124), Ryzen 9 9950X3D, Windows 11 build 26100, rustc 1.100.0 x86_64-pc-windows-msvc, MSVC 14.44 link.exe.
  • xcl.exe DllCharacteristics (release): main 0x8160 → with the change 0x8140 (HIGH_ENTROPY_VA off, DYNAMIC_BASE still on).
  • cargo build --workspace then cargo test --workspace -- --test-threads=4 on main + the change (debug): 717 passed, 0 failed, 41 ignored; low_va passes. SKIPPED: gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware (no wave64). Also cargo test --release -p xcl --test low_va: 1 passed.
  • Retail title 1.0.2.1 (the #585 one), XCL_NETWORK=0, fresh title data each run, 600 s cap, release builds:
build runs "DestAccelerationStructureData can not have more than 40b of address set" addresses seen how the run ended
main 09940bb 3 2 of 3 (at 112 s and 122 s; the third reached the #505 watchdog first, at 168 s) xboxbvhbuilder.dll at 0x1fb2ff00000 / 0x2e4d9bc0000; AS SRVs above 2^40 0xe06d7363 (2), watchdog (1)
main + this change 3 0 of 3 xboxbvhbuilder.dll at 0x9e60000; AS SRVs at 0x1947a0000–0x197d82e00 #505 watchdog at 108–120 s (all 3; one of them also had a local switch turning off the #795 Wait64 GPU bridge)

With the change the BVH builder's 40-bit check no longer fires; the runs then stop at the #505 stall instead. The AS SRVs are still logged as "not in unified memory – writing empty BVH descriptor" (a separate gap, no crash).

Not tested: AMD GPUs, the GNU toolchain, other titles (Minecraft / XDefiant / Fortnite / Unicorn Overlord), scripts/smoke.ps1 blocks.

AI use: Claude Code (Claude Opus 5.5) ran the builds, tests and retail runs on the hardware above and wrote this report.

**@⁠maephisto666** on GitHub · 2026-11-24 08:59 UTC · [original](https://github.com/xcl-dev/xcl/pull/631#issuecomment-7126809604) Test report: MSVC toolchain, and a retail run of #585's crash with and without this change. **Rebase note.** The PR no longer applies to `main` (`09940bb`): `main` gained its own `crates/xcl/build.rs` in #762 (translator source hash). I tested the PR's linker flag added to `main`'s `build.rs` (inside its `main()`, after the `XCL_TRANSLATOR_SOURCE_ID` line), plus `tests/low_va.rs` unchanged: ```rust match std::env::var("CARGO_CFG_TARGET_ENV").as_deref() { Ok("msvc") => println!("cargo:rustc-link-arg-bin=xcl=/HIGHENTROPYVA:NO"), Ok("gnu") => println!("cargo:rustc-link-arg-bin=xcl=-Wl,--disable-high-entropy-va"), _ => {} } ``` **Tested** - RTX 5090 (driver 32.0.16.2124), Ryzen 9 9950X3D, Windows 11 build 26100, rustc 1.100.0 `x86_64-pc-windows-msvc`, MSVC 14.44 link.exe. - `xcl.exe` DllCharacteristics (release): `main` `0x8160` → with the change `0x8140` (HIGH_ENTROPY_VA off, DYNAMIC_BASE still on). - `cargo build --workspace` then `cargo test --workspace -- --test-threads=4` on `main` + the change (debug): 717 passed, 0 failed, 41 ignored; `low_va` passes. SKIPPED: `gpu_geometry_wave32_prefix_count_over_a_mask`, `gpu_wave32_program_in_wave64_hardware` (no wave64). Also `cargo test --release -p xcl --test low_va`: 1 passed. - Retail title 1.0.2.1 (the #585 one), `XCL_NETWORK=0`, fresh title data each run, 600 s cap, release builds: | build | runs | "DestAccelerationStructureData can not have more than 40b of address set" | addresses seen | how the run ended | |---|---|---|---|---| | `main` `09940bb` | 3 | 2 of 3 (at 112 s and 122 s; the third reached the #505 watchdog first, at 168 s) | `xboxbvhbuilder.dll` at `0x1fb2ff00000` / `0x2e4d9bc0000`; AS SRVs above 2^40 | 0xe06d7363 (2), watchdog (1) | | `main` + this change | 3 | 0 of 3 | `xboxbvhbuilder.dll` at `0x9e60000`; AS SRVs at `0x1947a0000`–`0x197d82e00` | #505 watchdog at 108–120 s (all 3; one of them also had a local switch turning off the #795 Wait64 GPU bridge) | With the change the BVH builder's 40-bit check no longer fires; the runs then stop at the #505 stall instead. The AS SRVs are still logged as "not in unified memory – writing empty BVH descriptor" (a separate gap, no crash). **Not tested:** AMD GPUs, the GNU toolchain, other titles (Minecraft / XDefiant / Fortnite / Unicorn Overlord), `scripts/smoke.ps1` blocks. **AI use:** Claude Code (Claude Opus 5.5) ran the builds, tests and retail runs on the hardware above and wrote this report.
Author
Owner

@⁠Creaa on GitHub · 2026-11-24 09:03 UTC · original

MSVC test on RTX 4070

RTX 4070 (driver 617.14), Core i7-13700F, Windows build 26300, Rust 1.100.0 (MSVC). Compared the PR head with its direct parent to isolate the linker change.

  • cargo test --locked --release -p xcl --test low_va at the PR head: 1 passed, 0 failed, 0 ignored. PE DllCharacteristics was 0x8160 on the parent and 0x8140 on the PR head.
  • Same title, 60 seconds offline each with scripts/smoke.ps1: 643 frames on the parent and 580 on the PR head. Both exited normally with zero crashes and zero device removals in that window. One comparable DirectStorage destination (#4096) moved from 0x20b7465f6d4 to 0x18dfef6d4, below the 40-bit limit.
  • In a separate interactive run on the PR head, the earlier 40-bit BVH error did not recur. After loading and a black screen, a write to address zero at game image offset +0x23cf683 stopped the run at 218.382 s. That signature matches #846. Controllable gameplay was not reached. The parent was not run interactively for this comparison.

Smoke blocks below have the title field redacted.

xcl-smoke v1
commit: cb868b200517d7b11bbfcb0146bf0c787ce632b6
gpu: NVIDIA GeForce RTX 4070
title: [redacted]
seconds: 60
exit: 0x0
frames shown: 643 (PresentX 643)
presents per 2 s (last 3): 20 19 18
device removals: 0
crashes: 0
peak commit: 16050 MB
xcl-smoke v1
commit: 12be9306269772e1e24aa1e44219f2bce684c193
gpu: NVIDIA GeForce RTX 4070
title: [redacted]
seconds: 60
exit: 0x0
frames shown: 580 (PresentX 580)
presents per 2 s (last 3): 18 19 18
device removals: 0
crashes: 0
peak commit: 16040 MB

AI use: Codex (GPT-6) built the revisions, ran the tests and smoke trials, and drafted this report. The on-screen observations came from the user.

**@⁠Creaa** on GitHub · 2026-11-24 09:03 UTC · [original](https://github.com/xcl-dev/xcl/pull/631#issuecomment-7126892079) ### MSVC test on RTX 4070 RTX 4070 (driver 617.14), Core i7-13700F, Windows build 26300, Rust 1.100.0 (MSVC). Compared the PR head with its direct parent to isolate the linker change. - `cargo test --locked --release -p xcl --test low_va` at the PR head: 1 passed, 0 failed, 0 ignored. PE DllCharacteristics was `0x8160` on the parent and `0x8140` on the PR head. - Same title, 60 seconds offline each with `scripts/smoke.ps1`: 643 frames on the parent and 580 on the PR head. Both exited normally with zero crashes and zero device removals in that window. One comparable DirectStorage destination (#4096) moved from `0x20b7465f6d4` to `0x18dfef6d4`, below the 40-bit limit. - In a separate interactive run on the PR head, the earlier 40-bit BVH error did not recur. After loading and a black screen, a write to address zero at game image offset `+0x23cf683` stopped the run at 218.382 s. That signature matches #846. Controllable gameplay was not reached. The parent was not run interactively for this comparison. Smoke blocks below have the title field redacted. ``` xcl-smoke v1 commit: cb868b200517d7b11bbfcb0146bf0c787ce632b6 gpu: NVIDIA GeForce RTX 4070 title: [redacted] seconds: 60 exit: 0x0 frames shown: 643 (PresentX 643) presents per 2 s (last 3): 20 19 18 device removals: 0 crashes: 0 peak commit: 16050 MB ``` ``` xcl-smoke v1 commit: 12be9306269772e1e24aa1e44219f2bce684c193 gpu: NVIDIA GeForce RTX 4070 title: [redacted] seconds: 60 exit: 0x0 frames shown: 580 (PresentX 580) presents per 2 s (last 3): 18 19 18 device removals: 0 crashes: 0 peak commit: 16040 MB ``` AI use: Codex (GPT-6) built the revisions, ran the tests and smoke trials, and drafted this report. The on-screen observations came from the user.
Author
Owner

@⁠AlexLopezDevelop on GitHub · 2026-11-24 09:50 UTC · original

Tested on RTX 2080 Ti (Turing, driver 621.24) + Intel i9-9900K, Windows 11, 32 GB, retail 1.0.2.1, merged onto #891 (8cada26, XCL_PSO_WAIT_MS=50), DXC 1.9.2609, walked through the first-run setup by hand: #585 is gone.

  • Without this PR (#891 alone) the same walk ended at 312 s: DestAccelerationStructureData can not have more than 40b of address set, C++ exception in xboxbvhbuilder.dll (https://github.com/ivall/xcl/pull/891#issuecomment-7127653308).
  • With it, the built xcl.exe has IMAGE_DLLCHARACTERISTICS_HIGH_ENTROPY_VA cleared (DllCharacteristics 0x8140 against 0x8160 before), and the run went on to 633 s with 0 40b of address set errors: 24,096 draws and 3,115 dispatches recorded, Opus audio decoding throughout.
  • It logged CreateShaderResourceView(RAYTRACING_ACCELERATION_STRUCTURE) at 0x19… is not in unified memory – writing empty BVH descriptor 4 times, so the structures now sit below 2^40 but outside the unified windows.
  • The run then ended in the title's watchdog (+0x23cf683), which on this machine looks like #582's write-watch cost, not this PR: details in #582.

Merge note: crates/xcl/build.rs conflicts with main's translator-source hash main(); I kept both bodies in one main().

AI-assisted (Claude Code, Claude Opus 5.5).

**@⁠AlexLopezDevelop** on GitHub · 2026-11-24 09:50 UTC · [original](https://github.com/xcl-dev/xcl/pull/631#issuecomment-7127956277) Tested on **RTX 2080 Ti** (Turing, driver 621.24) + **Intel i9-9900K**, Windows 11, 32 GB, retail 1.0.2.1, merged onto #891 (`8cada26`, `XCL_PSO_WAIT_MS=50`), DXC 1.9.2609, walked through the first-run setup by hand: **#585 is gone.** - Without this PR (#891 alone) the same walk ended at 312 s: `DestAccelerationStructureData can not have more than 40b of address set`, C++ exception in `xboxbvhbuilder.dll` (https://github.com/ivall/xcl/pull/891#issuecomment-7127653308). - With it, the built `xcl.exe` has `IMAGE_DLLCHARACTERISTICS_HIGH_ENTROPY_VA` cleared (DllCharacteristics `0x8140` against `0x8160` before), and the run went on to 633 s with **0** `40b of address set` errors: 24,096 draws and 3,115 dispatches recorded, Opus audio decoding throughout. - It logged `CreateShaderResourceView(RAYTRACING_ACCELERATION_STRUCTURE) at 0x19… is not in unified memory – writing empty BVH descriptor` 4 times, so the structures now sit below 2^40 but outside the unified windows. - The run then ended in the title's watchdog (`+0x23cf683`), which on this machine looks like #582's write-watch cost, not this PR: details in #582. Merge note: `crates/xcl/build.rs` conflicts with `main`'s translator-source hash `main()`; I kept both bodies in one `main()`. AI-assisted (Claude Code, Claude Opus 5.5).
Author
Owner

@⁠ivall on GitHub · 2026-11-24 10:06 UTC · original

Merged as a port onto main's build.rs (from #762) in 02bfd1d, with the linker flag exactly as maephisto666 described and your tests/low_va.rs unchanged (authored as you) - GitHub will not show this PR as merged, so I am closing it by hand. Thanks! Checked on main 02bfd1d together with #891, #693, #551 and #631: cargo test --workspace -- --test-threads=4 green (685 lib tests), and a retail run through the menus and intro into the start of the world load with XCL_PSO_WAIT_MS=50: no crash, no device removal.

**@⁠ivall** on GitHub · 2026-11-24 10:06 UTC · [original](https://github.com/xcl-dev/xcl/pull/631#issuecomment-7128325111) Merged as a port onto main's `build.rs` (from #762) in 02bfd1d, with the linker flag exactly as maephisto666 described and your `tests/low_va.rs` unchanged (authored as you) - GitHub will not show this PR as merged, so I am closing it by hand. Thanks! Checked on main 02bfd1d together with #891, #693, #551 and #631: `cargo test --workspace -- --test-threads=4` green (685 lib tests), and a retail run through the menus and intro into the start of the world load with `XCL_PSO_WAIT_MS=50`: no crash, no device removal.

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No description provided.