step-examples/12-11-adversarial/Ad134.stp
Sources
- OCCT Mantis 33665 (`DIRECTION('',())` — empty `direction_ratios` list dereferenced in `StepGeom_Direction::NbDirectionRatios` during `TransferRoots`, yielding a null-deref segfault). B4 wave-10 DEF-W10-A (LGPL-clean — pattern only, no upstream bytes copied
- reproducibility-verified 2026-07-04).
Sender
STEP producers or hand-edited/machine-truncated files that emit a `DIRECTION` entity whose `direction_ratios` REAL-list is empty `()` while it is still referenced as the axis (or ref_direction) of an `AXIS2_PLACEMENT_3D` that places a surface belonging to a transferred `ADVANCED_FACE`; also fuzzers and aggregate-truncation corruption on any producer path.
Description
STEP file with a single `ADVANCED_FACE` (#69) on a `TOROIDAL_SURFACE` (#5, major_radius 50.0, minor_radius 10.0). The surface is placed by an `AXIS2_PLACEMENT_3D` (#4) whose axis direction is `#2=DIRECTION('',())` — a `DIRECTION` with an EMPTY `direction_ratios` list. Because the placement's surface IS the transferred face's `face_geometry`, OCCT reaches `#2` during `TransferRoots` and reads its direction-ratios aggregate; the aggregate has zero elements, so `StepGeom_Direction::NbDirectionRatios` / the coordinate access dereferences a null/empty backing array and the kernel dies with signal(11). The empty mandatory aggregate on an entity reached by the transferred shape is the crash trigger; a `DIRECTION('',())` that were NOT on the transfer path would be silently skipped.
Reproducer recipe
any OCCT-parseable STEP whose transferred shape reaches a `DIRECTION` entity (via `AXIS2_PLACEMENT_3D.axis` or `.ref_direction`, or a `VECTOR.orientation`) whose `direction_ratios` list is empty `()`; the entity must be on the transfer path of a root shape (e.g. the placement of the `ADVANCED_FACE`'s `face_geometry`), then run `TransferRoots`.
Expected kernel behavior
a `DIRECTION` with an empty (or wrong-arity) `direction_ratios` aggregate must be rejected or repaired (treated as a missing/default axis and diagnosed) — never dereferenced. The transfer must check `NbDirectionRatios() > 0` before accessing coordinates and produce one of {reject, heal-with-diagnostic}, never signal(11).
Notes
OCCT Mantis 33665. B4 wave-10 DEF-W10-A; reproducibility-verified 2026-07-04. This fixture opens the empty-mandatory-aggregate crash archetype (the long-missing signal(11) reproducer template: an empty required aggregate on an entity referenced by the transferred shape). The crash is deterministic and byte-triggered — visible directly on the input bytes with no writer round-trip needed. Confidence: HIGH — deterministic occt=signal(11)/signal(11) + gmsh=signal(11) across repeated runs. Synonyms: "empty direction_ratios crash", "DIRECTION('',()) null deref", "StepGeom_Direction NbDirectionRatios segfault", "empty mandatory aggregate on transferred shape", "AXIS2_PLACEMENT_3D empty axis direction crash", "OCCT Mantis 33665". Provenance tier: bytes-sufficient (the crash is byte-triggered and oracle-visible on the input file).
Expected validation
occt=signal(11)/signal(11) gmsh=signal(11) ifc=schema_n/a
Byte assertions
contains(b"DIRECTION('',())")contains(b'TOROIDAL_SURFACE')contains(b'AXIS2_PLACEMENT_3D')contains(b'ADVANCED_FACE')
Live oracle output
No live oracle data — run _run_corpus to populate.
Fixture content
Show fixture bytes (with defect highlighting)
1ISO-10303-21; 2/* Ad134: DIRECTION('',()) with an EMPTY direction_ratios list (#2) is used as the axis direction of the AXIS2_PLACEMENT_3D (#4) that places the TOROIDAL_SURFACE (#5), which IS the transferred ADVANCED_FACE.face_geometry (#69). OCCT dereferences the empty direction-ratios aggregate during TransferRoots (StepGeom_Direction::NbDirectionRatios) and dies with signal(11); the empty mandatory aggregate on an entity reached by the transferred shape is the crash trigger. OCCT Mantis 33665 null-deref reproducer; B4 wave-10 DEF-W10-A; reproducibility-verified 2026-07-04; occt=signal(11)/signal(11) gmsh=signal(11) */ 3HEADER; 4FILE_DESCRIPTION(('Ad134: empty direction_ratios on transferred-shape axis DIRECTION crashes OCCT (Mantis 33665)'),'2;1'); 5FILE_NAME('Ad134.stp','2026-07-04T00:00:00',(''),(''),'cad-research-suite','',''); 6FILE_SCHEMA(('AUTOMOTIVE_DESIGN { 1 0 10303 214 3 1 1 }')); 7ENDSEC; 8DATA; 9#9000=APPLICATION_CONTEXT('mechanical design'); 10#1=CARTESIAN_POINT('',(0.0,0.0,0.0)); 11#2=DIRECTION('',()); 12#3=DIRECTION('',(1.0,0.0,0.0)); 13#4=AXIS2_PLACEMENT_3D('',#1,#2,#3); 14#5=TOROIDAL_SURFACE('ad134_torus',#4,50.0,10.0); 15#6=CARTESIAN_POINT('',(60.0,0.0,0.0)); 16#7=CARTESIAN_POINT('',(59.7002499167,5.99000499881,0.0)); 17#8=CARTESIAN_POINT('',(59.6505411531,5.98501748632,0.998334166468)); 18#9=CARTESIAN_POINT('',(59.9500416528,0.0,0.998334166468)); 19#10=(GEOMETRIC_REPRESENTATION_CONTEXT(2)PARAMETRIC_REPRESENTATION_CONTEXT()REPRESENTATION_CONTEXT('UV','2D')); 20#11=VERTEX_POINT('',#6); 21#12=VERTEX_POINT('',#7); 22#13=VERTEX_POINT('',#8); 23#14=VERTEX_POINT('',#9); 24#15=CARTESIAN_POINT('',(60.0,0.0,0.0)); 25#16=DIRECTION('',(1.0,0.0,0.0)); 26#17=VECTOR('',#16,5.0); 27#18=LINE('',#15,#17); 28#19=CARTESIAN_POINT('',(0.0,0.0)); 29#20=DIRECTION('',(1.0,0.0)); 30#21=VECTOR('',#20,0.1); 31#22=LINE('',#19,#21); 32#23=DEFINITIONAL_REPRESENTATION('pcdef',(#22),#10); 33#24=PCURVE('pc',#5,#23); 34#25=SURFACE_CURVE('sc',#18,(#24),.PCURVE_S1.); 35#26=EDGE_CURVE('ec',#11,#12,#25,.T.); 36#27=CARTESIAN_POINT('',(0.0,0.0,0.0)); 37#28=DIRECTION('',(0.0,1.0,0.0)); 38#29=VECTOR('',#28,1.0); 39#30=LINE('',#27,#29); 40#31=CARTESIAN_POINT('',(0.1,0.0)); 41#32=DIRECTION('',(0.0,1.0)); 42#33=VECTOR('',#32,0.1); 43#34=LINE('',#31,#33); 44#35=DEFINITIONAL_REPRESENTATION('pcdef',(#34),#10); 45#36=PCURVE('pc',#5,#35); 46#37=SURFACE_CURVE('sc',#30,(#36),.PCURVE_S1.); 47#38=EDGE_CURVE('ec',#12,#13,#37,.T.); 48#39=CARTESIAN_POINT('',(0.0,0.0,0.0)); 49#40=DIRECTION('',(-1.0,0.0,0.0)); 50#41=VECTOR('',#40,1.0); 51#42=LINE('',#39,#41); 52#43=CARTESIAN_POINT('',(0.1,0.1)); 53#44=DIRECTION('',(-1.0,0.0)); 54#45=VECTOR('',#44,0.1); 55#46=LINE('',#43,#45); 56#47=DEFINITIONAL_REPRESENTATION('pcdef',(#46),#10); 57#48=PCURVE('pc',#5,#47); 58#49=SURFACE_CURVE('sc',#42,(#48),.PCURVE_S1.); 59#50=EDGE_CURVE('ec',#13,#14,#49,.T.); 60#51=CARTESIAN_POINT('',(0.0,0.0,0.0)); 61#52=DIRECTION('',(0.0,-1.0,0.0)); 62#53=VECTOR('',#52,1.0); 63#54=LINE('',#51,#53); 64#55=CARTESIAN_POINT('',(0.0,0.1)); 65#56=DIRECTION('',(0.0,-1.0)); 66#57=VECTOR('',#56,0.1); 67#58=LINE('',#55,#57); 68#59=DEFINITIONAL_REPRESENTATION('pcdef',(#58),#10); 69#60=PCURVE('pc',#5,#59); 70#61=SURFACE_CURVE('sc',#54,(#60),.PCURVE_S1.); 71#62=EDGE_CURVE('ec',#14,#11,#61,.T.); 72#63=ORIENTED_EDGE('',$,$,#26,.T.); 73#64=ORIENTED_EDGE('',$,$,#38,.T.); 74#65=ORIENTED_EDGE('',$,$,#50,.T.); 75#66=ORIENTED_EDGE('',$,$,#62,.T.); 76#67=EDGE_LOOP('',(#63,#64,#65,#66)); 77#68=FACE_OUTER_BOUND('',#67,.T.); 78#69=ADVANCED_FACE('',(#68),#5,.T.); 79#70=OPEN_SHELL('',(#69)); 80#71=SHELL_BASED_SURFACE_MODEL('',(#70)); 81#9050=PRODUCT_CONTEXT('',#9000,'mechanical'); 82#9051=PRODUCT('Ad134','Ad134','',(#9050)); 83#9052=PRODUCT_DEFINITION_FORMATION('','',#9051); 84#9053=PRODUCT_DEFINITION_CONTEXT('part definition',#9000,'design'); 85#9054=PRODUCT_DEFINITION('','','',#9052,#9053); 86#9055=PRODUCT_DEFINITION_SHAPE('','','',#9054); 87#9056=(LENGTH_UNIT()NAMED_UNIT(*)SI_UNIT(.MILLI.,.METRE.)); 88#9057=(NAMED_UNIT(*)PLANE_ANGLE_UNIT()SI_UNIT($,.RADIAN.)); 89#9058=(NAMED_UNIT(*)SI_UNIT($,.STERADIAN.)SOLID_ANGLE_UNIT()); 90#9059=UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(1.0E-7),#9056,'distance_accuracy_value',''); 91#9060=(GEOMETRIC_REPRESENTATION_CONTEXT(3)GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT((#9059))GLOBAL_UNIT_ASSIGNED_CONTEXT((#9056,#9057,#9058))REPRESENTATION_CONTEXT('','3D')); 92#9061=MANIFOLD_SURFACE_SHAPE_REPRESENTATION('',(#71),#9060); 93#9062=SHAPE_DEFINITION_REPRESENTATION(#9055,#9061); 94ENDSEC; 95END-ISO-10303-21;