Skip to content

test(as370): pin the undefined-symbol gap against IFOX00's listing (#82) - #83

Merged
mgrossmann merged 1 commit into
mainfrom
test/undefsym-tripwire
Aug 28, 2026
Merged

test(as370): pin the undefined-symbol gap against IFOX00's listing (#82)#83
mgrossmann merged 1 commit into
mainfrom
test/undefsym-tripwire

Conversation

@mgrossmann

Copy link
Copy Markdown
Contributor

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) and
zeroes the whole instruction:

statement IFOX00 (JOB02870) as370 today
BE NOWHERE 0000 0000 4780 0000
LH 3,NOSUCH(,7) 0000 0000 4830 7000
MVC FIELD-BASE(8,2),0(3) 0000 0000 0000 D207 2000 3000
L 4,=A(NOVAL) flagged pool word 00000000
DEFHERE DC A(DEFHERE) resolves resolves

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, two EQUs and a whole instruction (mvslovers/nsf370,
asm/nsfctcio.asm:95 and asm/nsfvsvc.asm 167/179/574/871) — and every
reference to the symbols those cards defined then assembled as a quiet zero:
BE DOUNSTG became 4780 0000, LH R3,ASCBASID(,R7) became 4830 7000, and
C R3,=A(ANCVERNO) compared against 0 instead of 3. RC 4, no diagnostic.

tests/undefsym.s is those four shapes, plus a defined-symbol control.

It is a tripwire

The run.sh case 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's
TPROT and IPTE), and it is deliberate: a silent gap that nobody can see is what
this whole thread has been about.

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
mgrossmann force-pushed the test/undefsym-tripwire branch from ed2ba9f to 28c1182 Compare August 28, 2026 22:02
@mgrossmann
mgrossmann merged commit 7d3c233 into main Aug 28, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant