Lh002 — Missing or malformed closing marker `END-ISO-10303-21;`

§12.1b header/numbering

spec-violation syntax

Sources

Description

Truncated downloads omit the closing `END-ISO-10303-21;`; concatenated dumps emit it twice; some generators substitute `END_ISO_10303_21;` (underscores), `END-ISO-10303;` (drops part number), or append trailing garbage after the marker.

Reproducer recipe

file ending with `ENDSEC;` and no `END-ISO-10303-21;`; or two `END-ISO-10303-21;` lines; or `END_ISO_10303_21;` substitution.

Expected kernel behavior

reject missing/duplicated end marker; tolerant mode may accept the underscore variant with a warning. Trailing bytes after the marker must be ignored, never appended to the previous entity.

Notes

**See also**: Ad038. Synonyms: "missing END-ISO-10303-21 marker", "truncated STEP file no end marker", "STEP closes with END_ISO_10303_21 underscores", "duplicate END marker in STEP", "trailing garbage after end marker".

Expected validation

occt=reject/reject gmsh=reject ifc=schema_n/a

Byte assertions

Tier-3 assertions

Cross-references

Ad038

Live oracle output

No live oracle data — run _run_corpus to populate.

Fixture content

Show fixture bytes (with defect highlighting)
1/* Lh002 — Missing or malformed closing marker END-ISO-10303-21;
2 * Defect: file ends after the final ENDSEC; without the required
3 * END-ISO-10303-21; closing marker. Per ISO 10303-21 the closing
4 * marker is mandatory; truncated downloads commonly omit it.
5 * Strict parsers must reject; tolerant readers may warn-and-accept.
6 * Body is otherwise valid Part-21 to isolate the defect to the
7 * missing close. */
8ISO-10303-21;
9HEADER;
10FILE_DESCRIPTION((''),'2;1');
11FILE_NAME('Lh002.stp','2026-04-26T00:00:00',(''),(''),
12  'cad-research-suite','','');
13FILE_SCHEMA(('AUTOMOTIVE_DESIGN'));
14ENDSEC;
15DATA;
16#1=APPLICATION_CONTEXT('automotive design');
17#2=APPLICATION_PROTOCOL_DEFINITION('international standard',
18  'automotive_design',2009,#1);
19#3=PRODUCT_CONTEXT('part',#1,'mechanical');
20#4=PRODUCT('Lh002-part','Lh002 demo','',(#3));
21#5=PRODUCT_DEFINITION_FORMATION('','',#4);
22#6=PRODUCT_DEFINITION_CONTEXT('part definition',#1,'design');
23#7=PRODUCT_DEFINITION('design','',#5,#6);
24#10=CARTESIAN_POINT('origin',(0.0,0.0,0.0));
25#11=DIRECTION('z',(0.0,0.0,1.0));
26#12=DIRECTION('x',(1.0,0.0,0.0));
27#13=AXIS2_PLACEMENT_3D('placement',#10,#11,#12);
28#20=(LENGTH_UNIT() NAMED_UNIT(*) SI_UNIT(.MILLI.,.METRE.));
29#21=(NAMED_UNIT(*) PLANE_ANGLE_UNIT() SI_UNIT($,.RADIAN.));
30#22=(NAMED_UNIT(*) SI_UNIT($,.STERADIAN.) SOLID_ANGLE_UNIT());
31#23=UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(1.0E-7),#20,
32  'distance_accuracy_value','');
33#24=(GEOMETRIC_REPRESENTATION_CONTEXT(3)
34  GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT((#23))
35  GLOBAL_UNIT_ASSIGNED_CONTEXT((#20,#21,#22))
36  REPRESENTATION_CONTEXT('Lh002','3D'));
37ENDSEC;