test: bound zero-count RCX branch mutation scans #852
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/858"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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$' -Vctest --preset release --no-tests=error -R '^cpu_aot_rcx_branches$' -VThe 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.