test(as370): pin the undefined-symbol gap against IFOX00's listing (#82) - #83
Merged
Conversation
This was referenced Aug 28, 2026
as370 assembles a reference to an undefined symbol as zero, at RC 0, with no diagnostic. IFOX00 flags each one IFO188 (severity 8, erms.asm:193 / jermsgcd.asm SEV188) and zeroes the whole instruction. The byte half matters as much as the message: IFOX00's all-zero instruction is an invalid opcode and S0C1s when reached, while as370's keeps its opcode and runs -- a branch to address 0, a load from base+0, an MVC into offset 0 of whatever the base register holds. That is how nsf370's two modules lost a DCBD, two EQUs and a whole instruction to the #72 continuation rule without a single diagnostic: the swallowed cards defined symbols, and the references to them went quiet instead of loud. tests/undefsym.s carries the four shapes those modules hit -- a branch target, a displacement symbol, a difference of two undefined symbols, and a literal adcon -- plus a defined-symbol control. IFOX00's listing for it is committed beside the other references. The run.sh case is a TRIPWIRE, not a passing feature: it asserts today's bytes and RC 0, so implementing #82 fails the suite and brings whoever does it to the oracle for the numbers to replace them with.
mgrossmann
force-pushed
the
test/undefsym-tripwire
branch
from
August 28, 2026 22:02
ed2ba9f to
28c1182
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The fixture and the oracle for #82, so that whoever fixes it has both in the
tree. No behaviour change.
What it pins
as370 assembles a reference to an undefined symbol as zero, at RC 0, in silence.
IFOX00 flags each one
IFO188 <symbol> IS AN UNDEFINED SYMBOL(severity 8) andzeroes the whole instruction:
BE NOWHERE0000 00004780 0000LH 3,NOSUCH(,7)0000 00004830 7000MVC FIELD-BASE(8,2),0(3)0000 0000 0000D207 2000 3000L 4,=A(NOVAL)00000000DEFHERE DC A(DEFHERE)Four statements flagged, five messages, RC 8 against RC 0 and no output.
The byte half is the worse one. IFOX00's all-zero instruction is an invalid
opcode and S0C1s the moment it is reached; as370's keeps its opcode and runs —
a branch to address 0, a load from base+0, an MVC into offset 0 of whatever the
base register happens to hold.
Why it is worth a fixture rather than a line in the issue
This is what kept nsf370's two broken modules quiet. Their column-72 comment
cards ate a
DCBD DSORG=PS, twoEQUs and a whole instruction (mvslovers/nsf370,asm/nsfctcio.asm:95andasm/nsfvsvc.asm167/179/574/871) — and everyreference to the symbols those cards defined then assembled as a quiet zero:
BE DOUNSTGbecame4780 0000,LH R3,ASCBASID(,R7)became4830 7000, andC R3,=A(ANCVERNO)compared against 0 instead of 3. RC 4, no diagnostic.tests/undefsym.sis those four shapes, plus a defined-symbol control.It is a tripwire
The
run.shcase asserts today's bytes and RC 0, and says so. Implementing#82 makes it fail, with a message pointing at the oracle
(
tests/listref/ifox-listing-undefsym.txt) for the numbers to replace them with.That is the same shape as the documented gaps already in the suite (
opcodes_370'sTPROT and IPTE), and it is deliberate: a silent gap that nobody can see is what
this whole thread has been about.