Recompile the grouped Bink allocation caller and verify payload placement #136

Manually merged
github merged 4 commits from gh-pr/136/head into gh-pr/136/base 2026-11-26 21:29:26 +00:00
Owner

@⁠Vonsek on GitHub · 2026-11-21 16:51 UTC · original
Vonsek:codex/bink-allocation-caller → main · +165 −6 · 7 files · 4 commits · merged 2026-11-21 17:55 UTC

Change

Trace the grouped allocation caller requested in the README CPU translation row. The null-context path rounds the prefix to 32 bytes and tail-calls the existing heap wrapper. The grouped path adds payload space, fills internal and external pointer slots and clears both counters even when allocation fails.

Verification

At d603dd6 on x64 Windows with MSVC 19.44 and Python 3.12, ctest --preset dev --no-tests=error -R '^cpu_aot_bink_' passed all four registered cases with the local image configured. The group check also passed when invoked directly against the native assembly fixture, its translation and the translation of the local caller. Before the change the check failed at the missing group export.

A 33-byte prefix with 48 extra bytes produced a 176-byte request at the heap observer. The internal pointer at offset 8 and the external slot received base + 64 and base + 80 respectively. With an injected allocation failure the external sentinel survived and both counters were zero.

Evidence and follow-up

The public control is new MASM source under the repository MIT license. The tests supply their own lengths, destinations and heap storage. Only the optional local build reads a package DLL. The caller was translated offline and the generated code ran on Windows. Which subsystem constructs the descriptors remains open. The experiment notes include commands and the inspected image fingerprint.

**@⁠Vonsek** on GitHub · 2026-11-21 16:51 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/136) `Vonsek:codex/bink-allocation-caller` → `main` · +165 −6 · 7 files · 4 commits · merged 2026-11-21 17:55 UTC ## Change Trace the grouped allocation caller requested in the README CPU translation row. The null-context path rounds the prefix to 32 bytes and tail-calls the existing heap wrapper. The grouped path adds payload space, fills internal and external pointer slots and clears both counters even when allocation fails. ## Verification At d603dd6 on x64 Windows with MSVC 19.44 and Python 3.12, `ctest --preset dev --no-tests=error -R '^cpu_aot_bink_'` passed all four registered cases with the local image configured. The group check also passed when invoked directly against the native assembly fixture, its translation and the translation of the local caller. Before the change the check failed at the missing group export. A 33-byte prefix with 48 extra bytes produced a 176-byte request at the heap observer. The internal pointer at offset 8 and the external slot received base + 64 and base + 80 respectively. With an injected allocation failure the external sentinel survived and both counters were zero. ## Evidence and follow-up The public control is new MASM source under the repository MIT license. The tests supply their own lengths, destinations and heap storage. Only the optional local build reads a package DLL. The caller was translated offline and the generated code ran on Windows. Which subsystem constructs the descriptors remains open. The [experiment notes](https://github.com/Vonsek/Xbox2Windows/blob/d603dd6/docs/experiments.md#bink-allocation-and-release-on-the-windows-heap) include commands and the inspected image fingerprint.
Follow a caller above the heap wrapper to check how it rounds a prefix, places payload pointers and consumes descriptors on allocation failure.
Keep the current experiment table alongside the grouped allocation result so the contribution can be reviewed against main.
Keep both experiments discoverable and runnable after the upstream CPU coverage update.
Link the measured even-stride producer and narrow the remaining question to odd tagged entries.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 21:29:24 +00:00
github manually merged commit aedfc9a998 into gh-pr/136/base 2026-11-26 21:29:26 +00:00
Author
Owner

@⁠chatgpt-codex-connector[bot] on GitHub · 2026-11-21 16:51 UTC · original · edited 2026-11-21 16:54 UTC

Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-21T16:54:26.949298Z d603dd6 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@⁠codex review" or "@⁠codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

**@⁠chatgpt-codex-connector[bot]** on GitHub · 2026-11-21 16:51 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/136#issuecomment-7065992222) · edited 2026-11-21 16:54 UTC <!-- codex-pull-request-review-summary --> <!-- codex-review-state:v1 {"code_review":{"commit_sha":"d603dd69e478a52d6f01a2f7903cefddcc668238","has_any_findings":false,"has_unresolved_findings":false,"status":"completed"},"security_review":{"commit_sha":null,"has_any_findings":null,"has_unresolved_findings":null,"status":null}} --> <details> <summary><strong>Codex Review Summary</strong>: ✅ Completed</summary> This comment shows the latest Codex review activity on this pull request. | Review | Status | Commit | Review trigger | | --- | --- | --- | --- | | 📝 **Code Review** | ✅ **Completed** <relative-time datetime="2026-11-21T16:54:26.949298Z">2026-11-21T16:54:26.949298Z</relative-time> | `d603dd6` | PR opened | <details> <summary>ℹ️ About Codex in GitHub</summary> <br/> [Your team has set up Codex to review pull requests in this repo](https://chatgpt.com/codex/cloud/settings/general). Reviews are triggered when you - Open a pull request for review - Mark a draft as ready - Comment "@⁠codex review" or "@⁠codex security review". Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. </details> </details>
Author
Owner

@⁠R0Y00 on GitHub · 2026-11-21 17:18 UTC · original

The grouped allocation caller and failure checks look good. GitHub now reports conflicts with main. Please sync the CPU build/test registrations and README summary with the newly merged jump-table work, then rerun the Bink comparison.

**@⁠R0Y00** on GitHub · 2026-11-21 17:18 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/136#issuecomment-7066377298) The grouped allocation caller and failure checks look good. GitHub now reports conflicts with main. Please sync the CPU build/test registrations and README summary with the newly merged jump-table work, then rerun the Bink comparison.
Author
Owner

@⁠Vonsek on GitHub · 2026-11-21 17:28 UTC · original

Synced with main at 245b207 in 087e0ad. The README now includes both jump-table dispatch and the grouped Bink caller, and CMake registers both experiments.

On x64 Windows, ctest --preset dev --no-tests=error -R '^cpu_aot_(bink_.*|jump_tables)$' passed the jump-table test and all four Bink tests, including both local-package comparisons. I also reran the Python group check directly against the native fixture, its translation and the translated package caller. All three passed.

**@⁠Vonsek** on GitHub · 2026-11-21 17:28 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/136#issuecomment-7066503433) Synced with main at 245b207 in 087e0ad. The README now includes both jump-table dispatch and the grouped Bink caller, and CMake registers both experiments. On x64 Windows, `ctest --preset dev --no-tests=error -R '^cpu_aot_(bink_.*|jump_tables)$'` passed the jump-table test and all four Bink tests, including both local-package comparisons. I also reran the Python group check directly against the native fixture, its translation and the translated package caller. All three passed.
This discussion has been locked. Commenting is limited to contributors.
No description provided.