Scripts: recognize explicit zero offsets in record headers #2726

Closed
luckyteagirl wants to merge 1 commit from upstream-pr/2736 into main
luckyteagirl commented 2026-11-26 09:15:28 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by luckyteagirl on 2026-11-26T09:15:28Z.


The immediate record-header matcher missed stores printed with an explicit zero displacement. For the same record writer, (%rax) reported the header and 0x0(%rax) reported ?.

What is in it

  • Match an optional 0x0 displacement on the cursor register when identifying an immediate header.
  • Exercise both address spellings and reject a nonzero displacement. The fixture continues to check branch targets with and without a hex prefix.

Tested

  • Windows, Python. With only the test change on main b49be183, both explicit-zero subcases failed. The bare and nonzero cases passed.
  • With the fix, python -B -m unittest discover -s scripts -p 'test_*.py' passed all 25 tests. git diff --check passed.

Regression run

Script and test changes only.

Not tested

  • Real title listings, the Rust workspace suite, GPU tests, or retail execution. The test uses synthetic disassembly.

AI use

OpenAI Codex (GPT-6) reproduced the issue, wrote the change and regression test, and ran the Python checks.

<!-- greyfinch-sync:ivall/xcl:issue:6623371600 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2736). Originally posted by [luckyteagirl](https://github.com/luckyteagirl) on 2026-11-26T09:15:28Z. --- The immediate record-header matcher missed stores printed with an explicit zero displacement. For the same record writer, `(%rax)` reported the header and `0x0(%rax)` reported `?`. **What is in it** - Match an optional `0x0` displacement on the cursor register when identifying an immediate header. - Exercise both address spellings and reject a nonzero displacement. The fixture continues to check branch targets with and without a hex prefix. **Tested** - Windows, Python. With only the test change on main `b49be183`, both explicit-zero subcases failed. The bare and nonzero cases passed. - With the fix, `python -B -m unittest discover -s scripts -p 'test_*.py'` passed all 25 tests. `git diff --check` passed. **Regression run** Script and test changes only. **Not tested** - Real title listings, the Rust workspace suite, GPU tests, or retail execution. The test uses synthetic disassembly. **AI use** OpenAI Codex (GPT-6) reproduced the issue, wrote the change and regression test, and ran the Python checks.
upstream-sync closed this pull request 2026-11-26 10:06:13 +00:00
luckyteagirl commented 2026-11-26 10:06:20 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by luckyteagirl on 2026-11-26T09:16:01Z.


Closing this draft in favor of #1694. Independent review of the older PR's diff found that it already accepts explicit

<!-- greyfinch-sync:ivall/xcl:comment:7187687421 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2736#issuecomment-7187687421). Originally posted by [luckyteagirl](https://github.com/luckyteagirl) on 2026-11-26T09:16:01Z. --- Closing this draft in favor of #1694. Independent review of the older PR's diff found that it already accepts explicit

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
xcl-dev/xcl!2726
No description provided.