Repository navigation
Conversation
`crates/xcl/build.rs` previously emitted `cargo:rustc-link-arg-bin=xcl=...` only, leaving the crate's integration test binaries linked with Windows high-entropy ASLR (where `VirtualAlloc(NULL)` lands above 2^40 instead of matching `xcl.exe`'s low-VA layout from xcl-dev#631). Also emit `cargo:rustc-link-arg-tests=/HIGHENTROPYVA:NO` (MSVC) and `cargo:rustc-link-arg-tests=-Wl,--disable-high-entropy-va` (GNU) in `crates/xcl/build.rs`, and extend `crates/xcl/tests/low_va.rs` to verify both `xcl.exe` and the integration-test executable clear `IMAGE_DLLCHARACTERISTICS_HIGH_ENTROPY_VA` and reserve `VirtualAlloc(NULL)` strictly below 2^40. Fixes xcl-dev#2263 Assisted-by: Google Antigravity (Gemini 4 Neon)
|
Tested on \5a26eb9db5516e8bdcd133140d993ec89a79a256\ (\5a26eb9, clean PR head):
|
|
Test report for Tested
Not tested
AI use: Claude Code with Claude Opus 5.5 ran the build, the suite and the regression run and wrote this report at my request. |
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! |
|
Code review on Remaining before merge: An AMD verification pass on |
TestedTested
The debug lib unit-test harness was the only test executable with Not testedThe release workspace suite and release lib harness, the other 18 GNU integration targets, AMD/Intel, and retail-title or external sample paths. The ignored tests and the skipped branches above are outside the measured coverage. AI useDeepSeek Harness (DS V4.1 FLASH) ran the initial tests. Codex desktop (GPT-6.2 SOL) independently reran the tests, audited the PE headers, and drafted this report. |
What is in it
Fixes #2263.
crates/xcl/build.rspreviously emittedcargo:rustc-link-arg-bin=xcl=...only, leaving the crate's integration test binaries linked with Windows high-entropy ASLR (whereVirtualAlloc(NULL)lands above2^40instead of matchingxcl.exe's low-VA layout from #631).crates/xcl/build.rs: also emitcargo:rustc-link-arg-tests=/HIGHENTROPYVA:NO(MSVC) andcargo:rustc-link-arg-tests=-Wl,--disable-high-entropy-va(GNU) alongside the existingcargo:rustc-link-arg-bin=xcldirectives.crates/xcl/tests/low_va.rs: shareassert_no_high_entropy_va(&Path)betweenxcl_exe_is_linked_without_high_entropy_vaand a newintegration_tests_are_linked_without_high_entropy_vatest that checks bothstd::env::current_exe()'s PEDllCharacteristics & IMAGE_DLLCHARACTERISTICS_HIGH_ENTROPY_VA == 0and a liveVirtualAlloc(NULL, 64 KiB, MEM_RESERVE, PAGE_READWRITE)(freed withVirtualFree) landing strictly below1usize << 40.Tested
1.9.2609.5(01b62ad4), debug and release builds.build.rschange:cargo test --release -p xcl --test low_va -- --nocapturefailedintegration_tests_are_linked_without_high_entropy_va(1 passed, 1 failed:DllCharacteristics 0x8160: high-entropy VA is on).cargo test --release -p xcl --test low_va -- --nocaptureandcargo test -j 4 -p xcl --test low_va -- --nocapture): 2 passed, 0 failed, 0 ignored in both release (0.00 s) and debug (0.01 s).cargo build --release --workspaceandcargo test --release --workspace --no-fail-fast -- --test-threads=4 --nocapture): 23 test binaries, 1251 passed, 0 failed, 46 ignored (all in-process integration test binaries built and passed under the low-VA layout), plus 27 runtimeSKIPPEDlines (20no wave64on RTX 4060,3wave32 per-lane formrefusedby driver,2missingd3d12SDKLayers.dll/ D3D12 debug layer,1driver shader cache toggle unavailable,1no heap windows).Regression run
Baseline (
origin/main1a0bbe3a):PR head (
5a26eb9d):Not tested
x86_64-pc-windows-gnutoolchain (-Wl,--disable-high-entropy-vamirrors the existingxcl.exedirective inbuild.rs, tested here onx86_64-pc-windows-msvc).#[ignore]tests on this machine.AI use
Implemented and verified with Google Antigravity (Gemini 4 Neon). All build-script and test changes, failing-first and post-fix runs, full workspace release tests, and paired 60 s RTX 4060 smoke runs were reviewed and executed locally.