step-examples/12-11-adversarial/Ad051.stp
Sources
- 08-occt-gitlog.md G030 (Mantis 0031292)
Description
References to entity numbers beyond DATA section, or legacy negative numbers, yield literal NULL via lookup; older OCCT segfaulted.
Reproducer recipe
`ADVANCED_FACE` referencing `#NNN` where NNN > max_id, or `#-1`.
Expected kernel behavior
treat as literal NULL; substitute defaults; do not segfault. Negative entity numbers (legacy) need pass-correction.
Notes
Cross-oracle: pure-Python Part-21 validator rejects (reject(E_UNRESOLVED_REFS)); OCCT silently accepts (load is `empty`). OCC auto-heals a spec-level violation.
Expected validation
occt=empty/empty gmsh=empty ifc=schema_n/a
Byte assertions
contains(b'#-1') or matches(rb'#-\d+')matches(rb'#-\d+')
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/* Ad051: negative entity references (#-1, #-2) and out-of-range IDs; legacy negative numbers yield NULL via lookup; ADVANCED_FACE and SHAPE_REPRESENTATION referencing #-1; out-of-range #9999999 reference; GEOMETRIC_CURVE_SET IS model entity â OCC yields empty */ 3HEADER; 4FILE_DESCRIPTION(('Ad051'),'2;1'); 5FILE_NAME('Ad051.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=ADVANCED_FACE('neg_ref',(#-1),#-2,.T.); 12#4=SHAPE_REPRESENTATION('neg_sr',(#-1),#-2); 13#5=MANIFOLD_SOLID_BREP('out_of_range',#9999999); 14#6=VERTEX_POINT('neg_vertex',#-3); 15ENDSEC; 16END-ISO-10303-21;