Skip to content

ice: panicked in internal_parser at array size should be a valid u64 #647

@thetayloredman

Description

@thetayloredman

Before we begin...

  • I have updated the Zirco toolchain to the latest version
  • I have searched the issue tracker for duplicates

What was the ICE diagnostic?

error: internal compiler error encountered: thread panicked
note: this is not your fault! this is ALWAYS a compiler bug.
note: compiler bugs threaten the Zirco ecosystem -- we would appreciate a bug report:
note: bug reporting link: https://github.com/zirco-lang/zrc/issues/new?template=ice.yml

note: version: zrc_cli 0.1.0 (commit unknown, release build, macos [aarch64])

note: command line arguments: zrc -

thread 'main' panicked at /nix/var/nix/builds/nix-12180-3004188486/source/target/release/build/zrc_parser-becbdd2e7cbad0c0/out/internal_parser.rs:55456:66:
array size should be a valid u64: ParseIntError { kind: PosOverflow }
stack backtrace:
   0: __rustc::rust_begin_unwind
   1: core::panicking::panic_fmt
   2: core::result::unwrap_failed
   3: zrc_parser::internal_parser::__parse__Program::__reduce336
   4: zrc_parser::internal_parser::__parse__Program::__reduce
   5: zrc::compile::compile
   6: zrc::main
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

error: end internal compiler error. compilation failed.

What were you doing when the panic occured?

Was messing around finding ICEs.

Provide an example of code that causes the panic.

u64 int overflow within the array length.

fn main() -> i32 {
    let x: [18446744073709551616]i32 = []; 
    return 0;
}

Other Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-parserRelating to the lexer or parserE-good-first-issueCall for participation: Easy issue. Good for newcomers.P-lowThe bug may cause some undesired behavior but the compiler still functions (e.g. display bugs)T-ICEInternal Compiler Errors (panics or crashes)

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status
    Ready

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions