step-examples/12-11-adversarial/Ad097.stp
Sources
- OCCT MANTIS#0030053
- OCCT MANTIS#0030280 (OCCT MANTIS tracker 502 as of 2026-05-02)
Description
A STEP file comment `/* .. */` contains characters that resemble entity-record terminators or section markers. Lexer that uses regex-based comment stripping can be tricked into ending the comment early, leaving the comment's tail interpreted as records.
Reproducer recipe
Comment containing `*/ENDSEC;` — naive regex strips up to first `*/`, leaving `ENDSEC;` interpreted as section terminator.
Expected kernel behavior
Heal and accept: comment-stripping is character-by-character with explicit `/*` and `*/` matching; never use greedy regex. Must not crash on embedded comment-like strings.
Notes
Cross-oracle: pure-Python Part-21 validator accepts (`accept`); OCCT rejects (`reject`). OCC enforces stricter framing than the spec text requires.
Expected validation
occt=reject/reject gmsh=reject ifc=reject
Byte assertions
contains(b'*/ENDSEC;')contains(b'/*') and contains(b'ENDSEC')
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/* Ad097 - Comment containing fake section terminator 3 * Defect: comment /* ... * / contains */ENDSEC; -- naive regex strips early */ 4HEADER; 5FILE_DESCRIPTION(('Ad097 test case','Comment containing fake section terminator'),'2;1'); 6FILE_NAME('Ad097.stp','2026-04-30T00:00:00',(''),(''),'cad-research-suite','',''); 7FILE_SCHEMA(('AUTOMOTIVE_DESIGN { 1 0 10303 214 1 1 1 1 }')); 8ENDSEC; 9DATA; 10#1=APPLICATION_CONTEXT('automotive_design'); 11#2=APPLICATION_PROTOCOL_DEFINITION('international standard','automotive_design',2000,#1); 12/* hostile comment containing */ENDSEC; 13#100=CARTESIAN_POINT('',(0.0,0.0,0.0)); 14ENDSEC; 15END-ISO-10303-21;