The compiler's per-compile pad halfword is no evidence #649

Manually merged
binjovi-bot merged 1 commit from rpg-9-ao-pad-halfword-20261028 into trunk 2026-10-28 14:01:10 +00:00
Owner

The compiler's per-compile pad halfword is no evidence

A program with output specifications has a static initialization that stores
a halfword whose high byte the compiler takes from uninitialized memory. The
byte differs from one compile of a source to the next (0x57, 0x17, 0x34, 0x54
over five compiles of r6e-const), so two compiles of one source compared as
different, and the 32 fixed O-specification rows of the loop could not reach
match whatever the emitter wrote.

The byte appears twice. In the code it is li rN,0xXX00 and sth rN,D(r30);
for XX of 0x80 and above, rldicl rN,rN,0,48 stands between them, which adds
one word. In the literals it is the XX 00 pair of the initial value image.

The comparison now treats the store as one pattern whatever the byte: the pair
counts as two instructions, the rldicl word counts as none, and every later
offset, branch destination and the range size count without it (the same
instruction counts and bytes on both sides). A store is that pattern only when its byte is corroborated: the
XX 00 pair is the only one in the literals, and the literal byte is masked.
With a second pair, or none (a store of zero, an ordinary constant), nothing is
located, the store stays ordinary code and its bytes stay evidence. Only the
exact form is normalized: the base register r30, a zero low byte of the immediate, a
rldicl of the same register. Another displacement or register, or any other
instruction, still differs.

A constant that is also the only XX 00 pair of the literals (a field with
inz of 4096 beside such a store) would still compare equal to a different
one of the same form; class-audit flags a lucky match.

RECOMPILE/r6e-const is a second compile of the public r6e-const probe; its
comparison with the saved twin is the regression test.

Gates

{"checks":{"net_statements":0},"census":{"statuses":{"recovered":645,"partial":0,"unresolved":0},"regressions":0,"newly_recovered":0},"golden":"golden 173/5/0 == dump 173/5/0","emit":{"worse":[],"better":45,"newly_clean":33,"clean_delta":33,"base":215,"new":248},"twins":{"groups":443,"recovered":435,"regressions":[],"newly":20},"allgroups":{"regressions":[],"newly":["rpg-corpus-captures/files-chain/stripped/object.savf 2","rpg-corpus-captures/files-display-write/stripped/object.savf 2","rpg-corpus-captures/files-logical/stripped/object.savf 2","savf/SC-CONSTRUCT/POINTER/rpg-pointer-procedure-auto/stripped/archive.savf 1","savf/SC-ILE/DSPLY/error-observable/archive.savf 2","savf/SC-ILE/DSPLY/error-stripped/archive.savf 2","savf/SC-ILE/DSPLY/stripped/archive.savf 2","savf/SC-ILE/EXPERIMENTS/d4-edit/stripped/object.savf 1","savf/SC-ILE/EXPERIMENTS/d4-out-const/stripped/object.savf 1","savf/SC-ILE/EXPERIMENTS/d4-out-input/stripped/object.savf 1","savf/SC-ILE/EXPERIMENTS/d4-srcstmt-dspf/stripped/object.savf 2","savf/SC-ILE/EXPERIMENTS/d7-args/stripped/object.savf 2","savf/SC-ILE/EXPERIMENTS/d7c-copy/stripped/object.savf 2","savf/SC-ILE/EXPERIMENTS/decimal-fault-report/stripped/archive.savf 1","savf/SC-ILE/EXPERIMENTS/decimal-sign-report/stripped/archive.savf 1","savf/SC-ILE/EXPERIMENTS/fmtind-j1/stripped/object.savf 1","savf/SC-ILE/EXPERIMENTS/fmtind-j2/stripped/object.savf 1","savf/SC-ILE/EXPERIMENTS/fmtind-j3/stripped/object.savf 1","savf/SC-ILE/EXPERIMENTS/format-base/stripped/archive.savf 2","savf/SC-ILE/EXPERIMENTS/format-rename/stripped/archive.savf 2","savf/SC-ILE/EXPERIMENTS/gotos-static/stripped/archive.savf 2","savf/SC-ILE/EXPERIMENTS/h-editc/stripped/object.savf 1","savf/SC-ILE/EXPERIMENTS/h-editc5/stripped/object.savf 1","savf/SC-ILE/EXPERIMENTS/h-editc6/stripped/object.savf 1","savf/SC-ILE/EXPERIMENTS/h-fmix/stripped/object.savf 11","savf/SC-ILE/EXPERIMENTS/h-subind/stripped/object.savf 1","savf/SC-ILE/EXPERIMENTS/packed-add-report/stripped/archive.savf 1","savf/SC-ILE/EXPERIMENTS/packed-compose-report/stripped/archive.savf 2","savf/SC-ILE/EXPERIMENTS/packed-compose-sign-report/stripped/archive.savf 2","savf/SC-ILE/EXPERIMENTS/program-literal/stripped/archive.savf 1","savf/SC-ILE/EXPERIMENTS/r5b-onexit-for/stripped/archive.savf 2","savf/SC-ILE/EXPERIMENTS/r5e-date-field/stripped/archive.savf 1","savf/SC-ILE/EXPERIMENTS/r5e-editc-held/stripped/archive.savf 1","savf/SC-ILE/EXPERIMENTS/r5i-figurative/stripped/archive.savf 1","savf/SC-ILE/EXPERIMENTS/r6a-float-inz/stripped/object.savf 1","savf/SC-ILE/EXPERIMENTS/r6a-reset-ds/stripped/object.savf 2","savf/SC-ILE/EXPERIMENTS/r6a-reset-fixed/stripped/object.savf 2","savf/SC-ILE/EXPERIMENTS/r6a-reset-two/stripped/object.savf 2","savf/SC-ILE/EXPERIMENTS/shared-io-full/stripped/archive.savf 2","savf/SC-ILE/EXPERIMENTS/shared-io-none/stripped/archive.savf 2","savf/SC-ILE/MONITOR/limits-observable/archive.savf 1","savf/SC-ILE/MONITOR/limits-stripped/archive.savf 1","savf/SC-ILE/MONITOR/stripped/archive.savf 2","savf/SC-ILE/TSTRIP-STRIPPED/archive.savf 2","savf/SC-ILE/TSTRIP/archive.savf 2"],"worse":[]},"full_check":{"exit":0,"seconds":742}}
# The compiler's per-compile pad halfword is no evidence A program with output specifications has a static initialization that stores a halfword whose high byte the compiler takes from uninitialized memory. The byte differs from one compile of a source to the next (0x57, 0x17, 0x34, 0x54 over five compiles of `r6e-const`), so two compiles of one source compared as `different`, and the 32 fixed O-specification rows of the loop could not reach `match` whatever the emitter wrote. The byte appears twice. In the code it is `li rN,0xXX00` and `sth rN,D(r30)`; for XX of 0x80 and above, `rldicl rN,rN,0,48` stands between them, which adds one word. In the literals it is the `XX 00` pair of the initial value image. The comparison now treats the store as one pattern whatever the byte: the pair counts as two instructions, the `rldicl` word counts as none, and every later offset, branch destination and the range size count without it (the same instruction counts and bytes on both sides). A store is that pattern only when its byte is corroborated: the `XX 00` pair is the only one in the literals, and the literal byte is masked. With a second pair, or none (a store of zero, an ordinary constant), nothing is located, the store stays ordinary code and its bytes stay evidence. Only the exact form is normalized: the base register r30, a zero low byte of the immediate, a `rldicl` of the same register. Another displacement or register, or any other instruction, still differs. A constant that is also the only `XX 00` pair of the literals (a field with `inz` of 4096 beside such a store) would still compare equal to a different one of the same form; class-audit flags a lucky match. `RECOMPILE/r6e-const` is a second compile of the public `r6e-const` probe; its comparison with the saved twin is the regression test. ## Gates ``` {"checks":{"net_statements":0},"census":{"statuses":{"recovered":645,"partial":0,"unresolved":0},"regressions":0,"newly_recovered":0},"golden":"golden 173/5/0 == dump 173/5/0","emit":{"worse":[],"better":45,"newly_clean":33,"clean_delta":33,"base":215,"new":248},"twins":{"groups":443,"recovered":435,"regressions":[],"newly":20},"allgroups":{"regressions":[],"newly":["rpg-corpus-captures/files-chain/stripped/object.savf 2","rpg-corpus-captures/files-display-write/stripped/object.savf 2","rpg-corpus-captures/files-logical/stripped/object.savf 2","savf/SC-CONSTRUCT/POINTER/rpg-pointer-procedure-auto/stripped/archive.savf 1","savf/SC-ILE/DSPLY/error-observable/archive.savf 2","savf/SC-ILE/DSPLY/error-stripped/archive.savf 2","savf/SC-ILE/DSPLY/stripped/archive.savf 2","savf/SC-ILE/EXPERIMENTS/d4-edit/stripped/object.savf 1","savf/SC-ILE/EXPERIMENTS/d4-out-const/stripped/object.savf 1","savf/SC-ILE/EXPERIMENTS/d4-out-input/stripped/object.savf 1","savf/SC-ILE/EXPERIMENTS/d4-srcstmt-dspf/stripped/object.savf 2","savf/SC-ILE/EXPERIMENTS/d7-args/stripped/object.savf 2","savf/SC-ILE/EXPERIMENTS/d7c-copy/stripped/object.savf 2","savf/SC-ILE/EXPERIMENTS/decimal-fault-report/stripped/archive.savf 1","savf/SC-ILE/EXPERIMENTS/decimal-sign-report/stripped/archive.savf 1","savf/SC-ILE/EXPERIMENTS/fmtind-j1/stripped/object.savf 1","savf/SC-ILE/EXPERIMENTS/fmtind-j2/stripped/object.savf 1","savf/SC-ILE/EXPERIMENTS/fmtind-j3/stripped/object.savf 1","savf/SC-ILE/EXPERIMENTS/format-base/stripped/archive.savf 2","savf/SC-ILE/EXPERIMENTS/format-rename/stripped/archive.savf 2","savf/SC-ILE/EXPERIMENTS/gotos-static/stripped/archive.savf 2","savf/SC-ILE/EXPERIMENTS/h-editc/stripped/object.savf 1","savf/SC-ILE/EXPERIMENTS/h-editc5/stripped/object.savf 1","savf/SC-ILE/EXPERIMENTS/h-editc6/stripped/object.savf 1","savf/SC-ILE/EXPERIMENTS/h-fmix/stripped/object.savf 11","savf/SC-ILE/EXPERIMENTS/h-subind/stripped/object.savf 1","savf/SC-ILE/EXPERIMENTS/packed-add-report/stripped/archive.savf 1","savf/SC-ILE/EXPERIMENTS/packed-compose-report/stripped/archive.savf 2","savf/SC-ILE/EXPERIMENTS/packed-compose-sign-report/stripped/archive.savf 2","savf/SC-ILE/EXPERIMENTS/program-literal/stripped/archive.savf 1","savf/SC-ILE/EXPERIMENTS/r5b-onexit-for/stripped/archive.savf 2","savf/SC-ILE/EXPERIMENTS/r5e-date-field/stripped/archive.savf 1","savf/SC-ILE/EXPERIMENTS/r5e-editc-held/stripped/archive.savf 1","savf/SC-ILE/EXPERIMENTS/r5i-figurative/stripped/archive.savf 1","savf/SC-ILE/EXPERIMENTS/r6a-float-inz/stripped/object.savf 1","savf/SC-ILE/EXPERIMENTS/r6a-reset-ds/stripped/object.savf 2","savf/SC-ILE/EXPERIMENTS/r6a-reset-fixed/stripped/object.savf 2","savf/SC-ILE/EXPERIMENTS/r6a-reset-two/stripped/object.savf 2","savf/SC-ILE/EXPERIMENTS/shared-io-full/stripped/archive.savf 2","savf/SC-ILE/EXPERIMENTS/shared-io-none/stripped/archive.savf 2","savf/SC-ILE/MONITOR/limits-observable/archive.savf 1","savf/SC-ILE/MONITOR/limits-stripped/archive.savf 1","savf/SC-ILE/MONITOR/stripped/archive.savf 2","savf/SC-ILE/TSTRIP-STRIPPED/archive.savf 2","savf/SC-ILE/TSTRIP/archive.savf 2"],"worse":[]},"full_check":{"exit":0,"seconds":742}} ```
The compiler's per-compile pad halfword of the static initialization is no evidence
All checks were successful
binjovi/ci Binjovi completed the frozen plan
3ab6acb420
binjovi-bot manually merged commit 3ab6acb420 into trunk 2026-10-28 14:01:10 +00:00
Sign in to join this conversation.
No reviewers
No labels
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
sean/sourcerer!649
No description provided.