Memory: size executable arenas for the requested allocation #1155
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl!1155
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1155"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@anakatt on GitHub · 2026-11-24 12:35 UTC · original
anakatt:memory/size-executable-arenas→main· +32 −5 · 1 files · 1 commits · openI make
alloc_codehonor requests larger than its default 64 KiB arena. Previously, it committed only 64 KiB and advanced the allocation cursor by the larger requested size, returning a pointer without enough backing memory.What is in it
stubs.rs: size each new arena for the aligned request, reject alignment overflow before locking, and compare against remaining capacity without overflowing an address addition.VirtualQueryregression for large requests and a subsequent small request; overflow regression and allocation-contract documentation.This is independent of #936's unwind registration; it does not add unwind metadata.
Tested
I ran debug tests on Windows 11 Pro ARM64 10.0.26100.1742 in UTM (4 GiB RAM, virtual
virt-10.0CPU, Red Hat VirtIO GPU DOD), with Rust 1.100.0x86_64-pc-windows-msvcand Visual Studio 2022 Build Tools. The guest used main47efa2ecea0a12934719ae69b81930cf02a4b1c3plus the source changes committed asa59c84e8309560e5dbf90e17ae965ee6d0c82212.cargo test --locked -p xcl --lib stubs::tests::executable_allocations_cover_the_requested_size -- --exact: 0 passed, 1 failed, 0 ignored, 720 filtered out.VirtualQueryshowed 65,537 requested bytes backed by only 65,536 committed bytes; the test did not write past the allocation.cargo test --locked -p xcl --lib stubs::tests -- --test-threads=4: 5 passed, 0 failed, 0 ignored, 716 filtered out; noSKIPPEDoutput. This includes the allocation regressions, generated stub execution and concurrent stub reuse.Not tested
I have not run the release profile, full workspace suite, native x64 Windows hardware, D3D12 GPU execution or a real title. I have not observed a game requesting an executable allocation larger than 64 KiB; this reproduces the allocator contract failure directly.
Regression run
Not run. This remains a draft pending the required real-title
xcl-smokeblocks from main and this PR's clean head, with the same title and duration.AI use
I used omp (
openai-codex/gpt-6-astra) to investigate, implement the fix and regressions, run the Windows tests, and prepare this PR.@DavidM1911 on GitHub · 2026-11-24 12:51 UTC · original
Independent verification on current
main384f7f7(branch already contains it — clean).Machine: Windows 11, Ryzen 9 7900X + RTX 3060 Ti; Rust stable MSVC, debug.
cargo test -p xcl --lib stubs: 7 passed, 0 failed.cargo test -p xcl --lib arena: 5 passed, 0 failed, 1 ignored —gpu_unified_memory_arenaandarena_blocks_come_from_the_pool_when_the_title_took_the_restexercise the sized-arena path on the real backend.AI use: test runs by Devin (Cognition, SWE-2); no code changes.
@eizispark on GitHub · 2026-11-24 13:33 UTC · original
Hardware test report — commit
a59c84eVerified clean merge with
main(47efa2e) ona59c84e8309560e5dbf90e17ae965ee6d0c82212: pass.Tested
rustc 1.100.0 (0ef1bc386 2026-11-09), release + test profilecargo test --workspace --no-fail-fast -- --test-threads=4:743 passed, 0 failed, 41 ignored(GPU tests skipped on this adapter:none), includingstubs::tests::executable_allocations_cover_the_requested_sizeandstubs::tests::executable_allocation_rejects_size_overflowRegression run
main(47efa2e):PR (
a59c84e):Not tested
ARENA_CHUNK); gameplay past the menusAI use: Antigravity (Google DeepMind), Gemini (exact version string not exposed in runtime environment) — ran the workspace test suite and 60 s retail smoke check on the hardware above and formatted this report.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.