Skip to content

Segfault in edge case UnitRange{UInt64} #58245

@sgaure

Description

@sgaure
julia> versioninfo()
Julia Version 1.11.5
Commit 760b2e5b739 (2025-04-14 06:53 UTC)
Build Info:
  Official https://julialang.org/ release
Platform Info:
  OS: Linux (x86_64-linux-gnu)
  CPU: 16 × AMD Ryzen 7 2700X Eight-Core Processor
  WORD_SIZE: 64
  LLVM: libLLVM-16.0.6 (ORCJIT, znver1)
Threads: 16 default, 0 interactive, 8 GC (on 16 virtual cores)
Environment:

julia> collect(0:typemax(UInt))

[1332714] signal 11 (1): Segmentation fault
in expression starting at REPL[2]:1
setindex! at ./array.jl:987 [inlined]
Array at ./range.jl:1375 [inlined]
Array at ./boot.jl:605 [inlined]
collect at ./range.jl:1380

From https://discourse.julialang.org/t/built-in-binary-search-for-sorted-collections/128374/12?u=sgaure

Metadata

Metadata

Assignees

No one assigned

    Labels

    rangesEverything AbstractRange

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions