Tfa179 — PLANE face whose outer wire includes a zero-length LINE edge crashes the reader (SIGSEGV); twisted-face checking is never reached

§12.3c

crash topology

Sources

Description

PLANE face whose outer wire includes a zero-length LINE edge crashes the reader (SIGSEGV); twisted-face checking is never reached

Reproducer recipe

Expected kernel behavior

Reject with a diagnostic naming the degenerate zero-length LINE edge in the outer wire (from (10,0,0) to itself): before building the face, detect any edge whose start and end points coincide within tolerance and refuse to sample a tangent/normal from it — a load must never crash; if the edge cannot simply be dropped without breaking the wire's closure, reject the whole face with the diagnostic rather than aborting the process.

Notes

Corrected 2026-07-17 (truth-in-labeling audit, Q14 second half): retitled/redescribed as an honest crash-robustness fixture — original claimed twisted-face checking produces a specific silent misclassification/undefined-behavior outcome; in reality the process crashes before that method (or any face-repair/small-face-check method) is ever reached. The crash itself is genuine and is retained as the fixture's real, verified defect (Expected validation unchanged: `signal(11)/signal(11)`). Part of the ~127-entry face-repair/small-face-check misnomer family identified in the truth-in-labeling audit — see `BACKLOG.md` Q14 for the full list and remediation approach. Synonyms: "zero-length LINE edge crash".

Expected validation

occt=signal(11)/signal(11) gmsh=signal(11) ifc=schema_n/a

Live oracle output

No live oracle data — run _run_corpus to populate.

Fixture content

Show fixture bytes
1ISO-10303-21;
2/* Tfa179 - ShapeAnalysis_CheckSmallFace.CheckTwisted with-degenerate-edge
3 * Defect: CheckTwisted tests a face's planarity by sampling points on edges
4 * and computing a normal; when the outer wire contains a degenerate edge,
5 * the edge's tangent is undefined, causing undefined behavior and NaN output
6 * that propagates downstream and crashes solvers.
7 * Reproducer: ADVANCED_FACE whose outer wire includes a degenerate edge.
8 */
9HEADER;
10FILE_DESCRIPTION(('Tfa179 CheckTwisted degenerate edge NaN'),'2;1');
11FILE_NAME('Tfa179.stp','2026-06-15T00:00:00',(''),(''),
12  'cad-research-suite','','');
13FILE_SCHEMA(('AUTOMOTIVE_DESIGN { 1 0 10303 214 3 1 1 }'));
14ENDSEC;
15DATA;
16#1=APPLICATION_CONTEXT('automotive design');
17#2=APPLICATION_PROTOCOL_DEFINITION('international standard',
18  'automotive_design',2009,#1);
19#10=CARTESIAN_POINT('origin',(0.0,0.0,0.0));
20#11=DIRECTION('z',(0.0,0.0,1.0));
21#12=DIRECTION('x',(1.0,0.0,0.0));
22#13=AXIS2_PLACEMENT_3D('plc',#10,#11,#12);
23#20=PLANE('base_plane',#13);
24/* Wire vertices: outer square with one degenerate edge */
25#200=CARTESIAN_POINT('',(0.0,0.0,0.0));
26#201=VERTEX_POINT('',#200);
27#202=CARTESIAN_POINT('',(10.0,0.0,0.0));
28#203=VERTEX_POINT('',#202);
29#204=CARTESIAN_POINT('',(10.0,0.0,0.0));
30#205=VERTEX_POINT('',#204);
31#206=CARTESIAN_POINT('',(10.0,10.0,0.0));
32#207=VERTEX_POINT('',#206);
33#208=CARTESIAN_POINT('',(0.0,10.0,0.0));
34#209=VERTEX_POINT('',#208);
35/* Edges */
36#300=VECTOR('',(1.0,0.0,0.0),10.0);
37#301=LINE('',#200,#300);
38#302=EDGE_CURVE('',#201,#203,#301,.T.);
39/* Degenerate edge: from (10,0) to (10,0) - zero length */
40#303=VECTOR('',(0.0,0.0,0.0),1.0);
41#304=LINE('',#202,#303);
42#305=EDGE_CURVE('',#203,#205,#304,.T.);
43#306=VECTOR('',(0.0,1.0,0.0),10.0);
44#307=LINE('',#204,#306);
45#308=EDGE_CURVE('',#205,#207,#307,.T.);
46#309=VECTOR('',(-1.0,0.0,0.0),10.0);
47#310=LINE('',#206,#309);
48#311=EDGE_CURVE('',#207,#209,#309,.T.);
49#312=VECTOR('',(0.0,-1.0,0.0),10.0);
50#313=LINE('',#208,#312);
51#314=EDGE_CURVE('',#209,#201,#313,.T.);
52/* Oriented edges */
53#400=ORIENTED_EDGE('',*,*,#302,.T.);
54#401=ORIENTED_EDGE('',*,*,#305,.T.);
55#402=ORIENTED_EDGE('',*,*,#308,.T.);
56#403=ORIENTED_EDGE('',*,*,#311,.T.);
57#404=ORIENTED_EDGE('',*,*,#314,.T.);
58/* Loop with degenerate edge */
59#500=EDGE_LOOP('',(#400,#401,#402,#403,#404));
60#501=FACE_OUTER_BOUND('',#500,.T.);
61#600=ADVANCED_FACE('with_degenerate',(#501),#20,.T.);
62#9000=PRODUCT_CONTEXT('',#1,'mechanical');
63#9001=PRODUCT('Tfa179','Tfa179','',(#9000));
64#9002=PRODUCT_DEFINITION_FORMATION('','',#9001);
65#9003=PRODUCT_DEFINITION_CONTEXT('part definition',#1,'design');
66#9004=PRODUCT_DEFINITION('','',#9002,#9003);
67#9005=PRODUCT_DEFINITION_SHAPE('','',#9004);
68#9006=(LENGTH_UNIT()NAMED_UNIT(*)SI_UNIT(.MILLI.,.METRE.));
69#9007=(NAMED_UNIT(*)PLANE_ANGLE_UNIT()SI_UNIT($,.RADIAN.));
70#9008=(NAMED_UNIT(*)SI_UNIT($,.STERADIAN.)SOLID_ANGLE_UNIT());
71#9009=UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(1.0E-7),#9006,'distance_accuracy_value','');
72#9010=(GEOMETRIC_REPRESENTATION_CONTEXT(3)GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT((#9009))GLOBAL_UNIT_ASSIGNED_CONTEXT((#9006,#9007,#9008))REPRESENTATION_CONTEXT('','3D'));
73#9020=OPEN_SHELL('wrap_shell',(#600));
74#9021=SHELL_BASED_SURFACE_MODEL('sbsm',(#9020));
75#9022=MANIFOLD_SURFACE_SHAPE_REPRESENTATION('',(#9021),#9010);
76#9023=SHAPE_DEFINITION_REPRESENTATION(#9005,#9022);
77ENDSEC;
78END-ISO-10303-21;