Ad131 — OCCT PR #448: malformed `FILE_SCHEMA` with literal `.` between schema name and version triple (every OCCT-written AP242 file in the wild)

§12.11 adversarial (sub-class: writer-emitted malformed schema declaration / massive-impact real-world defect)

P0 — receiver crash / hang / OOM

spec-violation adversarial

Sources

Sender

OCCT `STEPControl_Writer` 7.x through pre-8.0 (fixed in PR #448) — the C++ writer code path built the schema name as `TCollection_AsciiString schemaName = "AUTOMOTIVE_DESIGN."; schemaName += "{ 1 0 10303 442 3 0 0 }";` — with the trailing `.` on the schema-name literal producing the literal join point `AUTOMOTIVE_DESIGN.{ 1 0 10303 442 3 0 0 }`. The PR removes the trailing period.

Description

STEP file whose HEADER section contains a `FILE_SCHEMA(('AUTOMOTIVE_DESIGN.{ 1 0 10303 442 3 0 0 }'));` declaration — note the literal `.` (period) between the schema name `AUTOMOTIVE_DESIGN` and the opening brace `{` of the version-triple tuple. The DATA section contains a minimal cube `MANIFOLD_SOLID_BREP` (six planar 10×10×10 mm faces) so the file is otherwise valid. Strict Part 21 parsers reject the schema declaration on syntax grounds (the ISO 10303-21 grammar for a `SCHEMA_NAME` does not permit an embedded `.` before the parenthesized version tuple). Permissive parsers (including OCCT itself, since it wrote the malformation) accept the file but treat the schema as effectively unknown, falling back to generic AP203/AP214 handling and silently dropping AP242-specific tolerance and PMI entities. The literal `.{` byte sequence is directly detectable via byte assertion on the header.

Reproducer recipe

HEADER with `FILE_SCHEMA(('AUTOMOTIVE_DESIGN.{ 1 0 10303 442 3 0 0 }'));` (literal `.{` join point); minimal cube `MANIFOLD_SOLID_BREP` in DATA section.

Expected kernel behavior

STEP parsers must either (a) reject the file at HEADER parse time with a diagnostic pointing at the malformed `FILE_SCHEMA` declaration, or (b) accept the file with a recovery diagnostic (`W_FILE_SCHEMA_MALFORMED_DOT_SEPARATOR`) explaining that the schema was normalized by stripping the extra period; silent fallback to AP203/AP214 handling without diagnostic is unacceptable because AP242-specific entities are then silently dropped.

Notes

OCCT PR #448 patch line is exact; the malformed string is byte-verifiable. B4 wave-8 DEF-BBB. Confidence: HIGH. Impact: every OCCT-authored AP242 file in the wild between 2018 and OCCT 8.0 release carries this malformation — the corpus scale is millions of files across FreeCAD, KiCad, Salome, and downstream tools. Synonyms: "OCCT PR #448 FILE_SCHEMA extra dot", "AUTOMOTIVE_DESIGN. schema name period", "malformed FILE_SCHEMA OCCT 7.x AP242", "STEPControl_Writer schema-name dot bug", "every OCCT-written AP242 file schema malformed".

Expected validation

occt=shape(1)/shape(1) gmsh=shape(54) ifc=schema_n/a

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/* Ad131: FILE_SCHEMA(('AUTOMOTIVE_DESIGN.{ 1 0 10303 442 3 0 0 }')) — the literal '.' (period) between AUTOMOTIVE_DESIGN and the opening brace of the version tuple; the exact pattern OCCT 7.x through pre-8.0's STEPControl_Writer emitted for every AP242 export (fixed in OCCT PR #448); every FreeCAD, KiCad, Salome-Platform, and OCCT-based export of AP242 in the ~2018-2024 window carries this malformed header; strict Part 21 parsers reject the schema declaration; permissive parsers (OCCT itself) fall back to generic AP2xx handling and silently drop AP242-specific tolerance/PMI entities; minimal cube MANIFOLD_SOLID_BREP as carrier geometry; DEF-BBB; MANIFOLD_SOLID_BREP IS model entity — OCC (permissive) yields shape(1) */
3HEADER;
4FILE_DESCRIPTION(('Ad131'),'2;1');
5FILE_NAME('Ad131.stp','2026-06-17T00:00:00',(''),(''),'cad-research-suite','','');
6FILE_SCHEMA(('AUTOMOTIVE_DESIGN.{ 1 0 10303 442 3 0 0 }'));
7ENDSEC;
8DATA;
9#9000=APPLICATION_CONTEXT('mechanical design');
10#1=CARTESIAN_POINT('',(10.0,0,0));
11#2=DIRECTION('',(1,0,0));
12#3=DIRECTION('',(0,0,1));
13#4=AXIS2_PLACEMENT_3D('',#1,#2,#3);
14#5=PLANE('',#4);
15#6=CARTESIAN_POINT('',(10.0,0,0));
16#7=CARTESIAN_POINT('',(10.0,0,10.0));
17#8=CARTESIAN_POINT('',(10.0,10.0,10.0));
18#9=CARTESIAN_POINT('',(10.0,10.0,0));
19#10=VERTEX_POINT('',#6);
20#11=VERTEX_POINT('',#7);
21#12=VERTEX_POINT('',#8);
22#13=VERTEX_POINT('',#9);
23#14=DIRECTION('',(0.0,0.0,1.0));
24#15=VECTOR('',#14,10.0);
25#16=LINE('',#6,#15);
26#17=EDGE_CURVE('',#10,#11,#16,.T.);
27#18=ORIENTED_EDGE('',$,$,#17,.T.);
28#19=DIRECTION('',(0.0,1.0,0.0));
29#20=VECTOR('',#19,10.0);
30#21=LINE('',#7,#20);
31#22=EDGE_CURVE('',#11,#12,#21,.T.);
32#23=ORIENTED_EDGE('',$,$,#22,.T.);
33#24=DIRECTION('',(0.0,0.0,-1.0));
34#25=VECTOR('',#24,10.0);
35#26=LINE('',#8,#25);
36#27=EDGE_CURVE('',#12,#13,#26,.T.);
37#28=ORIENTED_EDGE('',$,$,#27,.T.);
38#29=DIRECTION('',(0.0,-1.0,0.0));
39#30=VECTOR('',#29,10.0);
40#31=LINE('',#9,#30);
41#32=EDGE_CURVE('',#13,#10,#31,.T.);
42#33=ORIENTED_EDGE('',$,$,#32,.T.);
43#34=EDGE_LOOP('',(#18,#23,#28,#33));
44#35=FACE_OUTER_BOUND('',#34,.T.);
45#36=ADVANCED_FACE('',(#35),#5,.T.);
46#37=CARTESIAN_POINT('',(0,0,0));
47#38=DIRECTION('',(-1,0,0));
48#39=DIRECTION('',(0,0,-1));
49#40=AXIS2_PLACEMENT_3D('',#37,#38,#39);
50#41=PLANE('',#40);
51#42=CARTESIAN_POINT('',(0,0,0));
52#43=CARTESIAN_POINT('',(0,10.0,0));
53#44=CARTESIAN_POINT('',(0,10.0,10.0));
54#45=CARTESIAN_POINT('',(0,0,10.0));
55#46=VERTEX_POINT('',#42);
56#47=VERTEX_POINT('',#43);
57#48=VERTEX_POINT('',#44);
58#49=VERTEX_POINT('',#45);
59#50=DIRECTION('',(0.0,1.0,0.0));
60#51=VECTOR('',#50,10.0);
61#52=LINE('',#42,#51);
62#53=EDGE_CURVE('',#46,#47,#52,.T.);
63#54=ORIENTED_EDGE('',$,$,#53,.T.);
64#55=DIRECTION('',(0.0,0.0,1.0));
65#56=VECTOR('',#55,10.0);
66#57=LINE('',#43,#56);
67#58=EDGE_CURVE('',#47,#48,#57,.T.);
68#59=ORIENTED_EDGE('',$,$,#58,.T.);
69#60=DIRECTION('',(0.0,-1.0,0.0));
70#61=VECTOR('',#60,10.0);
71#62=LINE('',#44,#61);
72#63=EDGE_CURVE('',#48,#49,#62,.T.);
73#64=ORIENTED_EDGE('',$,$,#63,.T.);
74#65=DIRECTION('',(0.0,0.0,-1.0));
75#66=VECTOR('',#65,10.0);
76#67=LINE('',#45,#66);
77#68=EDGE_CURVE('',#49,#46,#67,.T.);
78#69=ORIENTED_EDGE('',$,$,#68,.T.);
79#70=EDGE_LOOP('',(#54,#59,#64,#69));
80#71=FACE_OUTER_BOUND('',#70,.T.);
81#72=ADVANCED_FACE('',(#71),#41,.T.);
82#73=CARTESIAN_POINT('',(0,10.0,0));
83#74=DIRECTION('',(0,1,0));
84#75=DIRECTION('',(1,0,0));
85#76=AXIS2_PLACEMENT_3D('',#73,#74,#75);
86#77=PLANE('',#76);
87#78=CARTESIAN_POINT('',(0,10.0,0));
88#79=CARTESIAN_POINT('',(10.0,10.0,0));
89#80=CARTESIAN_POINT('',(10.0,10.0,10.0));
90#81=CARTESIAN_POINT('',(0,10.0,10.0));
91#82=VERTEX_POINT('',#78);
92#83=VERTEX_POINT('',#79);
93#84=VERTEX_POINT('',#80);
94#85=VERTEX_POINT('',#81);
95#86=DIRECTION('',(1.0,0.0,0.0));
96#87=VECTOR('',#86,10.0);
97#88=LINE('',#78,#87);
98#89=EDGE_CURVE('',#82,#83,#88,.T.);
99#90=ORIENTED_EDGE('',$,$,#89,.T.);
100#91=DIRECTION('',(0.0,0.0,1.0));
101#92=VECTOR('',#91,10.0);
102#93=LINE('',#79,#92);
103#94=EDGE_CURVE('',#83,#84,#93,.T.);
104#95=ORIENTED_EDGE('',$,$,#94,.T.);
105#96=DIRECTION('',(-1.0,0.0,0.0));
106#97=VECTOR('',#96,10.0);
107#98=LINE('',#80,#97);
108#99=EDGE_CURVE('',#84,#85,#98,.T.);
109#100=ORIENTED_EDGE('',$,$,#99,.T.);
110#101=DIRECTION('',(0.0,0.0,-1.0));
111#102=VECTOR('',#101,10.0);
112#103=LINE('',#81,#102);
113#104=EDGE_CURVE('',#85,#82,#103,.T.);
114#105=ORIENTED_EDGE('',$,$,#104,.T.);
115#106=EDGE_LOOP('',(#90,#95,#100,#105));
116#107=FACE_OUTER_BOUND('',#106,.T.);
117#108=ADVANCED_FACE('',(#107),#77,.T.);
118#109=CARTESIAN_POINT('',(0,0,0));
119#110=DIRECTION('',(0,-1,0));
120#111=DIRECTION('',(0,0,1));
121#112=AXIS2_PLACEMENT_3D('',#109,#110,#111);
122#113=PLANE('',#112);
123#114=CARTESIAN_POINT('',(0,0,0));
124#115=CARTESIAN_POINT('',(0,0,10.0));
125#116=CARTESIAN_POINT('',(10.0,0,10.0));
126#117=CARTESIAN_POINT('',(10.0,0,0));
127#118=VERTEX_POINT('',#114);
128#119=VERTEX_POINT('',#115);
129#120=VERTEX_POINT('',#116);
130#121=VERTEX_POINT('',#117);
131#122=DIRECTION('',(0.0,0.0,1.0));
132#123=VECTOR('',#122,10.0);
133#124=LINE('',#114,#123);
134#125=EDGE_CURVE('',#118,#119,#124,.T.);
135#126=ORIENTED_EDGE('',$,$,#125,.T.);
136#127=DIRECTION('',(1.0,0.0,0.0));
137#128=VECTOR('',#127,10.0);
138#129=LINE('',#115,#128);
139#130=EDGE_CURVE('',#119,#120,#129,.T.);
140#131=ORIENTED_EDGE('',$,$,#130,.T.);
141#132=DIRECTION('',(0.0,0.0,-1.0));
142#133=VECTOR('',#132,10.0);
143#134=LINE('',#116,#133);
144#135=EDGE_CURVE('',#120,#121,#134,.T.);
145#136=ORIENTED_EDGE('',$,$,#135,.T.);
146#137=DIRECTION('',(-1.0,0.0,0.0));
147#138=VECTOR('',#137,10.0);
148#139=LINE('',#117,#138);
149#140=EDGE_CURVE('',#121,#118,#139,.T.);
150#141=ORIENTED_EDGE('',$,$,#140,.T.);
151#142=EDGE_LOOP('',(#126,#131,#136,#141));
152#143=FACE_OUTER_BOUND('',#142,.T.);
153#144=ADVANCED_FACE('',(#143),#113,.T.);
154#145=CARTESIAN_POINT('',(0,0,10.0));
155#146=DIRECTION('',(0,0,1));
156#147=DIRECTION('',(1,0,0));
157#148=AXIS2_PLACEMENT_3D('',#145,#146,#147);
158#149=PLANE('',#148);
159#150=CARTESIAN_POINT('',(0,0,10.0));
160#151=CARTESIAN_POINT('',(0,10.0,10.0));
161#152=CARTESIAN_POINT('',(10.0,10.0,10.0));
162#153=CARTESIAN_POINT('',(10.0,0,10.0));
163#154=VERTEX_POINT('',#150);
164#155=VERTEX_POINT('',#151);
165#156=VERTEX_POINT('',#152);
166#157=VERTEX_POINT('',#153);
167#158=DIRECTION('',(0.0,1.0,0.0));
168#159=VECTOR('',#158,10.0);
169#160=LINE('',#150,#159);
170#161=EDGE_CURVE('',#154,#155,#160,.T.);
171#162=ORIENTED_EDGE('',$,$,#161,.T.);
172#163=DIRECTION('',(1.0,0.0,0.0));
173#164=VECTOR('',#163,10.0);
174#165=LINE('',#151,#164);
175#166=EDGE_CURVE('',#155,#156,#165,.T.);
176#167=ORIENTED_EDGE('',$,$,#166,.T.);
177#168=DIRECTION('',(0.0,-1.0,0.0));
178#169=VECTOR('',#168,10.0);
179#170=LINE('',#152,#169);
180#171=EDGE_CURVE('',#156,#157,#170,.T.);
181#172=ORIENTED_EDGE('',$,$,#171,.T.);
182#173=DIRECTION('',(-1.0,0.0,0.0));
183#174=VECTOR('',#173,10.0);
184#175=LINE('',#153,#174);
185#176=EDGE_CURVE('',#157,#154,#175,.T.);
186#177=ORIENTED_EDGE('',$,$,#176,.T.);
187#178=EDGE_LOOP('',(#162,#167,#172,#177));
188#179=FACE_OUTER_BOUND('',#178,.T.);
189#180=ADVANCED_FACE('',(#179),#149,.T.);
190#181=CARTESIAN_POINT('',(0,0,0));
191#182=DIRECTION('',(0,0,-1));
192#183=DIRECTION('',(-1,0,0));
193#184=AXIS2_PLACEMENT_3D('',#181,#182,#183);
194#185=PLANE('',#184);
195#186=CARTESIAN_POINT('',(0,0,0));
196#187=CARTESIAN_POINT('',(10.0,0,0));
197#188=CARTESIAN_POINT('',(10.0,10.0,0));
198#189=CARTESIAN_POINT('',(0,10.0,0));
199#190=VERTEX_POINT('',#186);
200#191=VERTEX_POINT('',#187);
201#192=VERTEX_POINT('',#188);
202#193=VERTEX_POINT('',#189);
203#194=DIRECTION('',(1.0,0.0,0.0));
204#195=VECTOR('',#194,10.0);
205#196=LINE('',#186,#195);
206#197=EDGE_CURVE('',#190,#191,#196,.T.);
207#198=ORIENTED_EDGE('',$,$,#197,.T.);
208#199=DIRECTION('',(0.0,1.0,0.0));
209#200=VECTOR('',#199,10.0);
210#201=LINE('',#187,#200);
211#202=EDGE_CURVE('',#191,#192,#201,.T.);
212#203=ORIENTED_EDGE('',$,$,#202,.T.);
213#204=DIRECTION('',(-1.0,0.0,0.0));
214#205=VECTOR('',#204,10.0);
215#206=LINE('',#188,#205);
216#207=EDGE_CURVE('',#192,#193,#206,.T.);
217#208=ORIENTED_EDGE('',$,$,#207,.T.);
218#209=DIRECTION('',(0.0,-1.0,0.0));
219#210=VECTOR('',#209,10.0);
220#211=LINE('',#189,#210);
221#212=EDGE_CURVE('',#193,#190,#211,.T.);
222#213=ORIENTED_EDGE('',$,$,#212,.T.);
223#214=EDGE_LOOP('',(#198,#203,#208,#213));
224#215=FACE_OUTER_BOUND('',#214,.T.);
225#216=ADVANCED_FACE('',(#215),#185,.T.);
226#217=CLOSED_SHELL('ad131_shell',(#36,#72,#108,#144,#180,#216));
227#218=MANIFOLD_SOLID_BREP('ad131_cube',#217);
228#9050=PRODUCT_CONTEXT('',#9000,'mechanical');
229#9051=PRODUCT('Ad131','Ad131','',(#9050));
230#9052=PRODUCT_DEFINITION_FORMATION('','',#9051);
231#9053=PRODUCT_DEFINITION_CONTEXT('part definition',#9000,'design');
232#9054=PRODUCT_DEFINITION('','','',#9052,#9053);
233#9055=PRODUCT_DEFINITION_SHAPE('','','',#9054);
234#9056=(LENGTH_UNIT()NAMED_UNIT(*)SI_UNIT(.MILLI.,.METRE.));
235#9057=(NAMED_UNIT(*)PLANE_ANGLE_UNIT()SI_UNIT($,.RADIAN.));
236#9058=(NAMED_UNIT(*)SI_UNIT($,.STERADIAN.)SOLID_ANGLE_UNIT());
237#9059=UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(1.0E-7),#9056,'distance_accuracy_value','');
238#9060=(GEOMETRIC_REPRESENTATION_CONTEXT(3)GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT((#9059))GLOBAL_UNIT_ASSIGNED_CONTEXT((#9056,#9057,#9058))REPRESENTATION_CONTEXT('','3D'));
239#9061=ADVANCED_BREP_SHAPE_REPRESENTATION('',(#218),#9060);
240#9062=SHAPE_DEFINITION_REPRESENTATION(#9055,#9061);
241ENDSEC;
242END-ISO-10303-21;