Skip to content

VecRange.len() crashes the compiler at build (check ok, build segfaults); VecRange.is_empty() too #1954

Closed

Description

@ehartford

Found reviewing #1947. let r = v.range(0, 1); r.len() passes with check but with build/with run segfaults the compiler (rc 139) on main; the same happens for r.is_empty() after #1947 (which fixes the other receivers in #1010 but cannot fix this one because the crash is in len itself). Needs the usual route: with reduce on the build predicate, then lldb on the crashing compiler frame.

Activity

  1. added
    bug
    on Oct 2, 2026
  2. ehartford commented on Oct 3, 2026

    @ehartford
    ContributorAuthor

    Fixed on main by 3044b9c (stack #1979, battery green on 029574d). The crash was v.range(0, 1) (two ints to a one-range method) reaching codegen; Sema now refuses anything but one range argument; range(0..2).len()/is_empty() fixture.

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

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions