step-examples/12-1c-syntax/Ls029.stp
Sources
- A007, N028
Description
`/* .. ` opens a comment that is never closed; lexer scans past EOF if loop only terminates on `*/`. One-byte read past mmap'd file boundary; weaponizable for info leak.
Reproducer recipe
`ISO-10303-21; HEADER; .. ENDSEC; DATA; /* unterminated`
Expected kernel behavior
Reject with `E_UNTERMINATED_COMMENT`: lexer must check `pos < end` on every advance and emit the diagnostic at EOF.
Notes
Cross-oracle: pure-Python Part-21 validator rejects (reject(E_NO_CLOSE)); OCCT silently accepts (load is `empty`). OCC auto-heals a spec-level violation. Synonyms: "unclosed STEP comment runs through EOF", "comment without closing star-slash", "STEP lexer reads past file end", "/* without */ in STEP", "comment terminator missing".
Expected validation
occt=reject/reject gmsh=reject ifc=reject
Byte assertions
matches(rb'(?s)/\*[^*]+$')matches(rb'(?s)/\*[^*]*$')
Tier-3 assertions
shape_null == True
Live oracle output
No live oracle data — run _run_corpus to populate.
Fixture content
Show fixture bytes (with defect highlighting)
1/* Ls029 - Comment terminator absent -- runs through EOF 2 ---------------------------------------------------------------------- 3 Catalog section : §12.1c comments 4 Sources : A007, N028 5 See also : Le015 6 ---------------------------------------------------------------------- 7 Defect 8 /* .. opens a comment that is never closed; lexer scans past EOF if 9 the loop only terminates on */. One-byte read past mmap'd file boundary; 10 weaponizable for info leak. 11 Expected behavior 12 Reject with E_UNTERMINATED_COMMENT: lexer must check pos < end on every 13 advance and emit the diagnostic at EOF. 14 ---------------------------------------------------------------------- 15*/ 16ISO-10303-21; 17HEADER; 18FILE_DESCRIPTION(('Ls029 - unterminated comment runs through EOF'),'2;1'); 19FILE_NAME('Ls029.stp','2026-06-20T00:00:00',('auto-generated'),(''), 20 'auto-generated','',''); 21FILE_SCHEMA(('AUTOMOTIVE_DESIGN { 1 0 10303 214 3 1 1 }')); 22ENDSEC; 23DATA; 24#1=CARTESIAN_POINT('origin',(0.,0.,0.)); 25#2=DIRECTION('x',(1.,0.,0.)); 26/* Defect: this comment is never closed; lexer must detect EOF while scanning for closing it