Skip to content

A schema nested past 124 levels builds, then fails reading back its stored schema #172

Closed

Description

@Kinflou
struct S {
    a: u8[][][]…   // 125 levels; unions nested as deep fail the same way
}
error build failed: CBOR decode failed: RecursionLimitExceeded

124 levels build; at 125 the build stores the schema, then can't decode what it stored. The failure is an internal error with no source location.

Fix: a nesting limit below the store's, checked before freezing, with a diagnostic pointing at the type. Related: the depth limit in the bounds design (core#98).

Found on core master (a8aee68).

Activity

  1. added
    bugSomething isn't working
    P2Soon
    on Nov 2, 2026
  2. Kinflou commented on Nov 9, 2026

    @Kinflou
    MemberAuthor

    Fixed by e454cc0. parse_schema refuses a syntax tree deeper than MAX_SYNTAX_DEPTH (256 levels, about 80 arrays), with a diagnostic at the node. That's below the ~124 arrays where the stored schema stopped decoding. Since #215, the ids_compile fuzz target round-trips every schema it compiles through CBOR, on pull requests and nightly.

  3. moved this from Todo to Done in Comline Development Roadmapon Nov 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2SoonbugSomething isn't workingcompilerParser, IR, CAS

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions