step-examples/12-11-adversarial/Ad101.stp
Sources
- OCCT MANTIS#0030348
- OCCT MANTIS#0029780 (OCCT MANTIS tracker 502 as of 2026-05-02)
Description
A wire's edge-curves-fix pass iterates edges and reads the next edge's first parameter. On an open wire (EDGE_LOOP whose ORIENTED_EDGEs do not connect end-to-start, i.e. a non-closed wire) whose last edge has been removed during the fix, the iterator continues past end-of-vector and throws an out-of-range error. Fixture pattern: EDGE_LOOP containing three ORIENTED_EDGEs forming a non-closed v0->v1->v2->v3 chain.
Reproducer recipe
Open wire of three edges (EDGE_LOOP not closed); first fix removes the last edge; subsequent step accesses `edges[3]`.
Expected kernel behavior
wire-fix iteration uses bounds-checked iterators and re-validates edge count after each modification.
Notes
**See also**: Twi051, Twi064. **OCC behavior**: silently accepts (no diagnostic, empty result); outside catalog's allowed set ({heal}). Kernel-bug witnessed: catalog asks for healing; OCC neither heals nor rejects; the input is dropped on the floor without diagnostic.
Expected validation
occt=empty/empty gmsh=empty ifc=schema_n/a
Byte assertions
count_entity_def(b'ORIENTED_EDGE') >= 3contains(b'EDGE_LOOP')contains(b'EDGE_LOOP') and count_entity_def(b'ORIENTED_EDGE') >= 3
Tier-3 assertions
load == "ok"
Cross-references
Live oracle output
No live oracle data — run _run_corpus to populate.
Fixture content
Show fixture bytes (with defect highlighting)
1ISO-10303-21; 2/* Ad101: open wire (non-closed EDGE_LOOP) with 3 ORIENTED_EDGEs forming v0->v1->v2->v3 chain; edge-curves-fix reads past end of edge vector after last edge removal; out-of-range OOB access; fix iteration must bounds-check after each edge modification; OCCT MANTIS#0030348, #0029780; See also Twi051, Twi064; GEOMETRIC_CURVE_SET IS model entity â OCC yields empty */ 3HEADER; 4FILE_DESCRIPTION(('Ad101'),'2;1'); 5FILE_NAME('Ad101.stp','2026-06-17T00:00:00',(''),(''),'cad-research-suite','',''); 6FILE_SCHEMA(('AUTOMOTIVE_DESIGN { 1 0 10303 214 3 1 1 }')); 7ENDSEC; 8DATA; 9#1=CARTESIAN_POINT('',(0.0,0.0,0.0)); 10#2=GEOMETRIC_CURVE_SET('',(#1)); 11#3=CARTESIAN_POINT('open_wire_v0',(0.0,0.0,0.0)); 12#4=CARTESIAN_POINT('open_wire_v1',(1.0,0.0,0.0)); 13#5=CARTESIAN_POINT('open_wire_v2',(2.0,0.0,0.0)); 14#6=CARTESIAN_POINT('open_wire_v3',(3.0,0.0,0.0)); 15#7=VERTEX_POINT('',#3); 16#8=VERTEX_POINT('',#4); 17#9=VERTEX_POINT('',#5); 18#10=VERTEX_POINT('',#6); 19#11=DIRECTION('',(1.0,0.0,0.0)); 20#12=VECTOR('',#11,1.0); 21#13=LINE('',#3,#12); 22#14=EDGE_CURVE('',#7,#8,#13,.T.); 23#15=DIRECTION('',(1.0,0.0,0.0)); 24#16=VECTOR('',#15,1.0); 25#17=LINE('',#4,#16); 26#18=EDGE_CURVE('',#8,#9,#17,.T.); 27#19=DIRECTION('',(1.0,0.0,0.0)); 28#20=VECTOR('',#19,1.0); 29#21=LINE('',#5,#20); 30#22=EDGE_CURVE('',#9,#10,#21,.T.); 31#23=ORIENTED_EDGE('',$,$,#14,.T.); 32#24=ORIENTED_EDGE('',$,$,#18,.T.); 33#25=ORIENTED_EDGE('',$,$,#22,.T.); 34#26=EDGE_LOOP('open_wire_loop',(#23,#24,#25)); 35ENDSEC; 36END-ISO-10303-21;