[BUG] Frame checker rejects explicit count-one shift spelling #23

Closed
opened 2026-10-17 06:05:05 +02:00 by erikinkinen · 2 comments
Owner

Summary

The frame checker rejects valid one-bit shifts when the selected disassembler prints the count explicitly. Four sites in the retained CI 578 input lose scalar evidence for this reason.

Reproduction

At 32f08dbd, pass either decoded instruction to prepare_bit_operation:

Bytes Opcode and operands
d1e8 shr $1,%eax
49d1e9 shr $1,%r9

Both occur twice in the retained runtime/dev root-mode input from CI 578.

Expected and actual behavior

Intel’s shift reference defines D1 /5 as a right shift by one. The checker should accept an equivalent explicit count while retaining its exact opcode, width and destination checks. It instead raises scalar shift text disagrees with bytes, because that branch accepts only the register-only spelling.

Environment and identity

Exsh 32f08dbd14ba7d80d5e76c13fc71047a317818e7, x86-64 runtime/dev root-mode capture. The original CI job expires at its frame deadline; the four refusals are visible in a separate replay of its unchanged captured input. The replay is diagnostic evidence, not a CI pass.

Evidence and prior checks

The retained instruction bytes and text agree on a one-bit right shift. The original D1 branch fixes the decoded count to one but compares the operand against %register alone. The separate deadline problem remains tracked in #4.

Tracking

  • Accept equivalent D1 count-one spellings with exact byte, width and destination binding.
  • Cover valid 32/64-bit forms, incorrect counts/destinations and unchanged C1 rules.
  • Recheck all four retained sites without suppressing other unresolved evidence.
## Summary The frame checker rejects valid one-bit shifts when the selected disassembler prints the count explicitly. Four sites in the retained CI 578 input lose scalar evidence for this reason. ## Reproduction At `32f08dbd`, pass either decoded instruction to `prepare_bit_operation`: | Bytes | Opcode and operands | | --- | --- | | `d1e8` | `shr $1,%eax` | | `49d1e9` | `shr $1,%r9` | Both occur twice in the retained runtime/dev root-mode input from [CI 578](https://git.erikinkinen.fi/erix/exsh/actions/runs/578). ## Expected and actual behavior [Intel’s shift reference](https://www.intel.com/content/dam/www/public/us/en/documents/manuals/64-ia-32-architectures-software-developer-vol-2b-manual.pdf) defines D1 /5 as a right shift by one. The checker should accept an equivalent explicit count while retaining its exact opcode, width and destination checks. It instead raises `scalar shift text disagrees with bytes`, because that branch accepts only the register-only spelling. ## Environment and identity Exsh `32f08dbd14ba7d80d5e76c13fc71047a317818e7`, x86-64 runtime/dev root-mode capture. The original CI job expires at its frame deadline; the four refusals are visible in a separate replay of its unchanged captured input. The replay is diagnostic evidence, not a CI pass. ## Evidence and prior checks The retained instruction bytes and text agree on a one-bit right shift. The original D1 branch fixes the decoded count to one but compares the operand against `%register` alone. The separate deadline problem remains tracked in #4. ## Tracking - [x] Accept equivalent D1 count-one spellings with exact byte, width and destination binding. - [x] Cover valid 32/64-bit forms, incorrect counts/destinations and unchanged C1 rules. - [x] Recheck all four retained sites without suppressing other unresolved evidence.
Author
Owner

Published 6cbf7cfc accepts decimal and hexadecimal explicit count-one spellings for D1 shifts. Six focused regressions pass, covering both widths, all four retained sites, wrong counts/destinations and unchanged C1 behavior. Full-suite coverage is still in progress; the separate frame-analysis deadline remains tracked in #4.

Published [`6cbf7cfc`](https://git.erikinkinen.fi/erix/exsh/commit/6cbf7cfc799077991e53a96f7e08a87cbe8b52ec) accepts decimal and hexadecimal explicit count-one spellings for D1 shifts. Six focused regressions pass, covering both widths, all four retained sites, wrong counts/destinations and unchanged C1 behavior. Full-suite coverage is still in progress; the separate frame-analysis deadline remains tracked in #4.
Author
Owner

The fix is published in 6cbf7cfc. The regression controls recheck all four retained sites, including their scalar transfers, while keeping incorrect counts, destinations and C1 encodings rejected. The full maintained cleanup suite also passes all 1,104 tests.

All three criteria are complete. The production frame-analysis deadline remains open in #4; this closure does not claim a complete graph or a CI pass.

The fix is published in `6cbf7cfc`. The regression controls recheck all four retained sites, including their scalar transfers, while keeping incorrect counts, destinations and C1 encodings rejected. The full maintained cleanup suite also passes all 1,104 tests. All three criteria are complete. The production frame-analysis deadline remains open in #4; this closure does not claim a complete graph or a CI pass.
erikinkinen added this to the Alpha 1 milestone 2026-10-30 09:33:50 +01:00
Sign in to join this conversation.
No milestone
No project
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.

Dependencies

No dependencies set

Reference
erix/exsh#23
No description provided.