step-examples/12-13-writer-pathology/Wr003.stp
Sources
- prostep ivip CAx-IF
- OCCT forum "concatenating two STEP files produces unparseable result"
Sender
Older Siemens NX export and several in-house writers
Description
The closing `END-ISO-10303-21;` token is emitted without a trailing newline. The spec does not require one (it requires only the closing marker), so the file is well-formed. But concatenation of two such files produces `END-ISO-10303-21;ISO-10303-21;` on a single line, which trips a class of crude scripts that grep for `^ISO-10303-21;`. Bug-reporter language: "can't concat two STEPs", "POSIX text-file rule violated", "no newline at end of file".
Reproducer recipe
Part-21 file ending with the bytes `END-ISO-10303-21;` and no `0x0A` after.
Expected kernel behavior
Heal and accept: parsers normalize / accept this form (the spec permits it); downstream tooling that concatenates files adds its own separator.
Notes
A POSIX-text-file convention (text files end with newline) but not a Part-21 requirement. Provenance tier: writer-side (Q5 full-corpus 2026-07-01).
Expected validation
occt=empty/empty gmsh=empty ifc=schema_n/a
Provenance tier
writer-side — defect not fully embodied in fixture bytes.
Byte assertions
bytes_ends_with(b'END-ISO-10303-21;')not bytes_ends_with(b'\n')
Tier-3 assertions
load == "ok"
Live oracle output
No live oracle data — run _run_corpus to populate.
Fixture content
Show fixture bytes (with defect highlighting)
1ISO-10303-21; 2/* Wr003: END-ISO-10303-21; has no trailing newline */ 3HEADER; 4FILE_DESCRIPTION(('Wr003 - no trailing newline after END-ISO-10303-21;'),'2;1'); 5FILE_NAME('Wr003.stp','2026-06-20T00:00:00',('auto-generated'),(''), 6 'auto-generated','',''); 7FILE_SCHEMA(('AUTOMOTIVE_DESIGN { 1 0 10303 214 3 1 1 }')); 8ENDSEC; 9DATA; 10/* Defect: the file terminates immediately after the semicolon, no 0x0A */ 11#1=CARTESIAN_POINT('p0',(0.,0.,0.)); 12#2=CARTESIAN_POINT('p1',(1.,0.,0.)); 13#3=CARTESIAN_POINT('p2',(1.,1.,0.)); 14#4=GEOMETRIC_CURVE_SET('no-newline',()); 15ENDSEC; 16END-ISO-10303-21;