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)
Contributor
|
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. |
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 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.