Lh043 — Header `FILE_DESCRIPTION` with comments inside string

§12.1b header structure

P1 — silent data loss

syntax

Sources

Description

A `FILE_DESCRIPTION` record's strings contain `/* */` sequences that legacy readers strip as comments. The result is corrupted description content and possibly truncated header records.

Reproducer recipe

`FILE_DESCRIPTION(('Test /* note */ part'),'2;1');` — reader strips `/* note */` from inside the description string.

Expected kernel behavior

Heal and accept: comment-stripping never applies inside string literals; bracket comment characters with string-context state.

Notes

Cross-oracle: pure-Python Part-21 validator accepts (`accept`); OCCT rejects (`reject`). OCC enforces stricter framing than the spec text requires. Synonyms: "FILE_DESCRIPTION string contains comment", "/* inside FILE_DESCRIPTION string", "embedded comment in header literal", "STEP comment inside string", "header description with comment characters".

Expected validation

occt=reject/reject gmsh=reject ifc=reject

Byte assertions

Tier-3 assertions

Live oracle output

No live oracle data — run _run_corpus to populate.

Fixture content

Show fixture bytes (with defect highlighting)
1ISO-10303-21;
2/* Lh043: FILE_DESCRIPTION string containing embedded comment sequence /* note */ */
3/* ISO 10303-21: comment sequences /* */ apply only outside string literals */
4/* DEFECT: legacy readers strip /* note */ from inside the string, corrupting content */
5/* pure-Python validator accepts; OCC rejects; expected: heal and accept */
6HEADER;
7FILE_DESCRIPTION(('Test /* note */ part description'),'2;1');
8/* DEFECT: /* note */ inside the string literal above must NOT be stripped as a comment */
9FILE_NAME('Lh043.stp','2026-06-20T00:00:00',(''),(''),'cad-research-suite','','');
10FILE_SCHEMA(('AUTOMOTIVE_DESIGN'));
11ENDSEC;
12DATA;
13#1=CARTESIAN_POINT('origin',(0.,0.,0.));
14#2=CARTESIAN_POINT('corner',(1.,1.,0.));
15#3=DIRECTION('xdir',(1.,0.,0.));
16#4=DIRECTION('zdir',(0.,0.,1.));
17#5=GEOMETRIC_CURVE_SET('comment-in-string-shape',(#1,#2));
18ENDSEC;
19END-ISO-10303-21;