Ad015 — Empty aggregate where schema requires at least one element

§12.11 (sub-class: schema-validation / null-deref)

crash adversarial

Sources

Description

Schema declares `LIST [1:?]`; producer emits empty list; downstream code dereferences `list[0]`. Or weight-array length mismatches pole-count.

Reproducer recipe

`#1=ADVANCED_FACE('',(),#42,.T.);` (empty bound list); `#1=TESSELLATED_SHELL('',(),$);`.

Expected kernel behavior

validate `LIST` bounds against schema lower bound at parse time; reject with `E_AGGREGATE_BOUNDS`.

Notes

Cross-oracle: pure-Python Part-21 validator accepts (`accept`); OCCT crashes (`signal(11)`). The crash is on the kernel side; the file is spec-conformant Part-21.

Expected validation

occt=signal(11)/signal(11) gmsh=signal(11) ifc=schema_n/a

Byte assertions

Live oracle output

No live oracle data — run _run_corpus to populate.

Fixture content

Show fixture bytes
1ISO-10303-21;
2/* ============================================================
3   WARNING: THIS FILE IS INTENTIONALLY MALFORMED.
4   It exists ONLY for parser-robustness / fuzz-class testing.
5   DO NOT feed to a production translator without sandboxing.
6
7   Entry  : Ad015
8   Title  : Empty aggregate where schema requires at least
9            one element (LIST [1:?] violation).
10   Defect : Multiple attribute slots are populated with the
11            empty aggregate '()' even though the schema
12            mandates a lower bound of 1. Downstream code
13            that accesses list[0] without first checking
14            length will dereference past the end.
15              - #1 ADVANCED_FACE: empty bound list
16              - #2 TESSELLATED_SHELL: empty face list
17              - #3 EDGE_LOOP: empty edge list
18              - #4 BSPLINE_CURVE: zero poles
19              - #5 APPLIED_GROUP_ASSIGNMENT: empty group
20   Expected: validate LIST bounds against schema lower bound
21             at parse time; reject with E_AGGREGATE_BOUNDS.
22   See also: Ad003, Ls013.
23   ============================================================ */
24HEADER;
25FILE_DESCRIPTION(('Ad015 empty aggregate'),'2;1');
26FILE_NAME('Ad015.stp','2026-04-26T00:00:00',('synthetic'),('cad-research'),
27  'none','none','none');
28FILE_SCHEMA(('AUTOMOTIVE_DESIGN { 1 0 10303 214 3 1 1 }'));
29ENDSEC;
30DATA;
31/* empty bound list violates LIST [1:?] */
32#1=ADVANCED_FACE('',(),#42,.T.);
33
34/* empty tessellated face list */
35#2=TESSELLATED_SHELL('',(),$);
36
37/* empty edge_loop */
38#3=EDGE_LOOP('',());
39
40/* zero-pole bspline (also exercises Ad003 bounds confusion) */
41#4=BSPLINE_CURVE_WITH_KNOTS('',3,(),.UNSPECIFIED.,.F.,.F.,
42  (),(),.UNSPECIFIED.);
43
44/* empty group assignment */
45#5=APPLIED_GROUP_ASSIGNMENT(#6,());
46#6=GROUP('','',$);
47
48#42=PLANE('',#43);
49#43=AXIS2_PLACEMENT_3D('',#44,$,$);
50#44=CARTESIAN_POINT('',(0.,0.,0.));
51ENDSEC;
52END-ISO-10303-21;