step-examples/12-11-adversarial/Ad005.stp
Sources
- 12-adversarial.md A005
- 08-occt-gitlog.md G030
- 16-iso-spec.md N036, N053
- 06-nist-sfa.md S008
- 03-occt-tests.md R044 (entity #18 deleted but referenced)
Description
Attribute slot references instance ID never declared, or whose ID exceeds reasonable bounds; resolver dereferences `nullptr` from lookup table.
Reproducer recipe
`#1=ADVANCED_FACE('',(#42),#43,.T.);` where `#42`,`#43` never declared.
Expected kernel behavior
Reject with `E_UNDEFINED_REF` diagnostic: two-pass parse (declare-all then resolve); tolerant mode may warn and accept treating as literal NULL for legacy compatibility.
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
matches(rb'ADVANCED_FACE\([^;]*#42[^;]*#43') or contains(b'#999999999')
Tier-3 assertions
load == "ok"
Live oracle output
No live oracle data — run _run_corpus to populate.
Fixture content
Show fixture bytes
1ISO-10303-21; 2/* Ad005: dangling forward references to undefined IDs; ADVANCED_FACE references #42 and #43 (never declared); MANIFOLD_SOLID_BREP references #999999999 (extreme-magnitude ID); GEOMETRIC_CURVE_SET IS model entity â OCC yields empty */ 3HEADER; 4FILE_DESCRIPTION(('Ad005'),'2;1'); 5FILE_NAME('Ad005.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('',(#42),#43,.T.); 12#4=MANIFOLD_SOLID_BREP('',#999999999); 13#5=SHAPE_REPRESENTATION('s',(#100),#101); 14ENDSEC; 15END-ISO-10303-21;