Ls052 — Instance ID just past `UINT64_MAX` wraps to a low-numbered ID

§12.1c instance-namespace

silent-loss syntax

Sources

Description

`UINT64_MAX` is 18446744073709551615. The ID 18446744073709551617 is two greater and wraps modulo 2^64 to 1, which collides with the low-numbered `#1` namespace and may enable type confusion if the reader does not validate before storing.

Reproducer recipe

`#18446744073709551617=AXIS2_PLACEMENT_3D('wrap',#1,$,$);`

Expected kernel behavior

Detect overflow during digit accumulation and reject with `E_INSTANCE_ID_RANGE`; never silently wrap.

Notes

**See also**: Ls038, Ls051. **OCC behavior**: silently accepts (no diagnostic, empty result); catalog disallows silent-accept. Kernel-bug witnessed: receivers enforcing the spec must reject (or surface a diagnostic); silent acceptance defeats the catalog's stated invariant. Synonyms: "instance ID wraps to low number", "ID past UINT64_MAX collides with #1", "modular wrap on STEP instance ID", "STEP ID overflow type confusion", "huge ID wraps to small ID". Provenance tier: bytes-only (Q5 full-corpus 2026-07-01).

Expected validation

occt=empty/empty gmsh=empty ifc=schema_n/a

Provenance tier

bytes-only — defect not fully embodied in fixture bytes.

Byte assertions

Tier-3 assertions

Cross-references

Ls038, Ls051

Live oracle output

No live oracle data — run _run_corpus to populate.

Fixture content

Show fixture bytes (with defect highlighting)
1/* Ls052 - Instance ID just past UINT64_MAX wraps to a low-numbered ID
2   ----------------------------------------------------------------------
3   Catalog section : §12.1c instance-namespace
4   Sources         : T016, T017, A022
5   See also        : Ls038, Ls051
6   ----------------------------------------------------------------------
7   Defect
8     UINT64_MAX is 18446744073709551615. The ID 18446744073709551617
9     is two greater and wraps modulo 2^64 to 1, which collides with
10     the low-numbered #1 namespace and may enable type confusion if
11     the reader does not validate before storing.
12   Expected behavior
13     Detect overflow during digit accumulation and reject with
14     E_INSTANCE_ID_RANGE; never silently wrap.
15   ----------------------------------------------------------------------
16*/
17ISO-10303-21;
18HEADER;
19FILE_DESCRIPTION(('Ls052 - instance ID UINT64_MAX+2 wraps to #1'),'2;1');
20FILE_NAME('Ls052.stp','2026-06-20T00:00:00',('auto-generated'),(''),
21  'auto-generated','','');
22FILE_SCHEMA(('AUTOMOTIVE_DESIGN { 1 0 10303 214 3 1 1 }'));
23ENDSEC;
24DATA;
25/* #1 is a legitimate CARTESIAN_POINT */
26#1=CARTESIAN_POINT('origin',(0.,0.,0.));
27/* Defect: UINT64_MAX+2 = 18446744073709551617; wraps mod 2^64 to 1 */
28/* A silent wrap aliases this entity onto #1, causing type confusion */
29#18446744073709551617=AXIS2_PLACEMENT_3D('wrap',#1,$,$);
30ENDSEC;
31END-ISO-10303-21;