test: bound zero-count RCX branch mutation scans #852

Merged
R0Y00 merged 1 commit from upstream-pr/858 into main 2026-11-23 14:18:55 +00:00
R0Y00 commented 2026-11-23 14:06:27 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-23T14:06:27Z.


The zero-count guard mutation can enter LOOPNE with RCX=0. The counter wraps and the scan needs to find its needle in the input bytes. The old tail only supplied zero, so the mutant could read past its source buffer and fail with an access violation instead of a comparison mismatch.

Add every tested needle to the tail. The original 7,712 native/translated comparisons and all three negative controls remain. Both commands passed locally on Windows x64:

  • ctest --preset dev --no-tests=error -R '^cpu_aot_rcx_branches$' -V
  • ctest --preset release --no-tests=error -R '^cpu_aot_rcx_branches$' -V

The controls caught 3,836 noecx, 4,432 nozf and 7,056 jrcxz mismatches in each build. The intermittent failure surfaced during the Windows rerun for #602.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6561087430 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/858). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-23T14:06:27Z. --- The zero-count guard mutation can enter LOOPNE with RCX=0. The counter wraps and the scan needs to find its needle in the input bytes. The old tail only supplied zero, so the mutant could read past its source buffer and fail with an access violation instead of a comparison mismatch. Add every tested needle to the tail. The original 7,712 native/translated comparisons and all three negative controls remain. Both commands passed locally on Windows x64: - `ctest --preset dev --no-tests=error -R '^cpu_aot_rcx_branches$' -V` - `ctest --preset release --no-tests=error -R '^cpu_aot_rcx_branches$' -V` The controls caught 3,836 noecx, 4,432 nozf and 7,056 jrcxz mismatches in each build. The intermittent failure surfaced during the Windows rerun for #602.
upstream-sync closed this pull request 2026-11-24 06:45:07 +00:00
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
R0Y00/Xbox2Windows!852
No description provided.