Skip to content

Loader: reject out-of-module addresses in constant time - #61

Draft
bmjask wants to merge 1 commit into
stack/057-dxil-container-one-copyfrom
stack/058-module-address-envelope
Draft

bmjask wants to merge 1 commit into
stack/057-dxil-container-one-copyfrom
stack/058-module-address-envelope

Conversation

@bmjask

@bmjask bmjask commented Nov 26, 2026

Copy link
Copy Markdown
Owner

Stacked on #60.

This is an internal draft stack in bmjask/xcl; it is not an upstream merge request.

What and why

This unit isolates loader: reject out-of-module addresses in constant time as one reviewable step in the redesign.

What is in it

  • cd007484 is the cleaned-stack form of integrated commit f9aab0e4.

The patch content is preserved; only ancestry changed to omit a canceled add/revert sequence.

Tested

Tests were not rerun while packaging this already-integrated change into the draft stack.

Regression run

Not run during stack packaging.

Not tested

  • Windows MSVC build and test suite
  • D3D12 GPU execution
  • scripts/smoke.ps1 main/head comparison

AI use

Codex, GPT-5.6-sol, removed canceled ancestry, created the stack branch, and drafted this description. It did not author new code during stack packaging.

@bmjask
bmjask force-pushed the stack/057-dxil-container-one-copy branch from 2a00d41 to d9bdfe2 Compare November 27, 2026 00:45
@bmjask
bmjask force-pushed the stack/058-module-address-envelope branch from cd00748 to 5546586 Compare November 27, 2026 00:46
Pack the lock-free module ranges into a single table with a monotonic address envelope, making the common PC/driver-address rejection O(1). Publish registration and removal under the mapped-module write lock and make all containment arithmetic overflow-safe.

A controlled same-base test holds registration between range publication and vector publication and proves unregister cannot create a zombie entry.

The upstream release microbenchmark reported a 19-23x improvement for out-of-envelope probes against 32 modules. GNU Windows-target cargo check passed here; Windows/MSVC and runtime tests were not run on this host.

Adapted from PR xcl-dev#2673.
Assisted-by: Google Antigravity (Gemini 4 Neon)
Assisted-by: Codex (GPT-5.6-sol)

Assisted-by: Codex (GPT-5.6-sol)
@bmjask
bmjask force-pushed the stack/058-module-address-envelope branch from 5546586 to cdce86f Compare November 27, 2026 05:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant