step-examples/12-1c-syntax/Ls051.stp
Sources
- T016, T017, A022
Description
A 22-digit instance ID overflows a `uint64_t` accumulator during digit-by-digit parsing. stepcode historically skips an entire section when an ID width exceeds its allocator's `digits10 + 1`.
Reproducer recipe
`#9999999999999999999999=CARTESIAN_POINT('huge',(0.0,0.0,0.0));`
Expected kernel behavior
Detect overflow during digit accumulation and reject with `E_INSTANCE_ID_RANGE`; if width must be capped, emit a precise per-instance diagnostic and continue parsing.
Notes
**See also**: Ls038, Ls052. Synonyms: "22-digit instance ID overflows uint64", "huge instance ID overflows accumulator", "STEP ID width exceeds 20 digits", "stepcode skips section on big ID", "instance ID too wide for uint64_t". 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
matches(rb'#\d{20,}=')
Tier-3 assertions
shape_null == True
Cross-references
Live oracle output
No live oracle data — run _run_corpus to populate.
Fixture content
Show fixture bytes (with defect highlighting)
1/* Ls051 - Instance ID with 22 digits (overflows uint64_t accumulator) 2 ---------------------------------------------------------------------- 3 Catalog section : §12.1c instance-namespace 4 Sources : T016, T017, A022 5 See also : Ls038, Ls052 6 ---------------------------------------------------------------------- 7 Defect 8 A 22-digit instance ID overflows a uint64_t accumulator during 9 digit-by-digit parsing. stepcode historically skips an entire 10 section when an ID width exceeds its allocator's digits10 + 1. 11 UINT64_MAX has 20 digits; #9999999999999999999999 has 22. 12 Expected behavior 13 Detect overflow during digit accumulation and reject with 14 E_INSTANCE_ID_RANGE; emit a per-instance diagnostic and continue. 15 ---------------------------------------------------------------------- 16*/ 17ISO-10303-21; 18HEADER; 19FILE_DESCRIPTION(('Ls051 - 22-digit instance ID overflows uint64_t'),'2;1'); 20FILE_NAME('Ls051.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=CARTESIAN_POINT('anchor',(0.,0.,0.)); 26/* Defect: 22-digit ID overflows uint64_t accumulator */ 27/* A compliant reader must reject this or emit a per-instance diagnostic */ 28#9999999999999999999999=CARTESIAN_POINT('huge',(0.,0.,0.)); 29ENDSEC; 30END-ISO-10303-21;