Ad087 — STEP reader crashes on file with unresolved entity reference

§12.11 adversarial

P2 — spec deviation (no data loss)

silent-loss adversarial

Sources

Description

A STEP file references an entity ID (`#999`) that is not present in the file (the producer truncated the file or omitted the record). Reader's `TransferRoots` follows the reference, dereferences a null pointer, and crashes.

Reproducer recipe

Minimal STEP file where `MANIFOLD_SOLID_BREP` references `#999` but `#999` is undefined.

Expected kernel behavior

Reject with `E_DANGLING_REFERENCE` diagnostic listing the offending source ID and target ID; never dereference a null entity. Must not crash on unresolved reference.

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

Tier-3 assertions

Live oracle output

No live oracle data — run _run_corpus to populate.

Fixture content

Show fixture bytes (with defect highlighting)
1ISO-10303-21;
2/* Ad087: dangling reference to #999 (entity never defined); TransferRoots dereferences null pointer on unresolved reference; cross-oracle: Part-21 validator → reject(E_UNRESOLVED_REFS); OCCT silently accepts with empty result; MANTIS#0033487, #0033665, #0033603, #0032314; See also Ad078; GEOMETRIC_CURVE_SET IS model entity — OCC yields empty */
3HEADER;
4FILE_DESCRIPTION(('Ad087'),'2;1');
5FILE_NAME('Ad087.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=MANIFOLD_SOLID_BREP('dangling_brep',#999);
12#4=SHAPE_REPRESENTATION('dangling_rep',(#999),#9010);
13#5=FACE_OUTER_BOUND('dangling_bound',#999,.T.);
14#6=NEXT_ASSEMBLY_USAGE_OCCURRENCE('n1','','',#9001,#999,$);
15ENDSEC;
16END-ISO-10303-21;