I discover this (using Version 1.11.5 (2025-04-14) )
julia> collect(Base.OneTo(2^59))
ERROR: OutOfMemoryError()
Stacktrace:
[1] GenericMemory
@ .\boot.jl:516 [inlined]
[2] Array
@ .\boot.jl:578 [inlined]
[3] Array
@ .\range.jl:1372 [inlined]
[4] Array
@ .\boot.jl:605 [inlined]
[5] collect(r::Base.OneTo{Int64})
@ Base .\range.jl:1380
[6] top-level scope
@ REPL[2]:1
julia> collect(Base.OneTo(2^60))
ERROR: ArgumentError: invalid GenericMemory size: too large for system address width
Stacktrace:
[1] GenericMemory
@ .\boot.jl:516 [inlined]
[2] Array
@ .\boot.jl:578 [inlined]
[3] Array
@ .\range.jl:1372 [inlined]
[4] Array
@ .\boot.jl:605 [inlined]
[5] collect(r::Base.OneTo{Int64})
@ Base .\range.jl:1380
[6] top-level scope
@ REPL[3]:1
julia> collect(Base.OneTo(2^61))
Please submit a bug report with steps to reproduce this fault, and any error messages that follow (in their entirety). Thanks.
Exception: EXCEPTION_ACCESS_VIOLATION at 0x7ffa6b1bb350 -- jl_gc_pool_alloc_inner at C:/workdir/src\gc.c:1329
in expression starting at none:0
jl_gc_pool_alloc_inner at C:/workdir/src\gc.c:1329
jl_gc_alloc_ at C:/workdir/src\julia_internal.h:523 [inlined]
_new_array at C:/workdir/src\array.c:71 [inlined]
new_array at C:/workdir/src\array.c:93 [inlined]
ijl_alloc_array_1d at C:/workdir/src\array.c:156
decode_backtrace at C:/workdir/src\stackwalk.c:307
ijl_get_excstack at C:/workdir/src\stackwalk.c:368
#current_exceptions#97 at .\error.jl:151
current_exceptions at .\error.jl:150 [inlined]
current_exceptions at .\error.jl:150 [inlined]
eval_user_input at C:\workdir\usr\share\julia\stdlib\v1.11\REPL\src\REPL.jl:272
repl_backend_loop at C:\workdir\usr\share\julia\stdlib\v1.11\REPL\src\REPL.jl:368
#start_repl_backend#59 at C:\workdir\usr\share\julia\stdlib\v1.11\REPL\src\REPL.jl:343
start_repl_backend at C:\workdir\usr\share\julia\stdlib\v1.11\REPL\src\REPL.jl:340
#run_repl#76 at C:\workdir\usr\share\julia\stdlib\v1.11\REPL\src\REPL.jl:500
run_repl at C:\workdir\usr\share\julia\stdlib\v1.11\REPL\src\REPL.jl:486
jfptr_run_repl_10381.1 at K:\julia-1.11.5\share\julia\compiled\v1.11\REPL\u0gqU_hz07T.dll (unknown line)
#1150 at .\client.jl:446
jfptr_YY.1150_15121.1 at K:\julia-1.11.5\share\julia\compiled\v1.11\REPL\u0gqU_hz07T.dll (unknown line)
jl_apply at C:/workdir/src\julia.h:2157 [inlined]
jl_f__call_latest at C:/workdir/src\builtins.c:875
#invokelatest#2 at .\essentials.jl:1055 [inlined]
invokelatest at .\essentials.jl:1052 [inlined]
run_main_repl at .\client.jl:430
repl_main at .\client.jl:567 [inlined]
_start at .\client.jl:541
jfptr__start_75200.1 at K:\julia-1.11.5\lib\julia\sys.dll (unknown line)
jl_apply at C:/workdir/src\julia.h:2157 [inlined]
true_main at C:/workdir/src\jlapi.c:900
jl_repl_entrypoint at C:/workdir/src\jlapi.c:1059
mainCRTStartup at C:/workdir/cli\loader_exe.c:58
BaseThreadInitThunk at C:\WINDOWS\System32\KERNEL32.DLL (unknown line)
RtlUserThreadStart at C:\WINDOWS\SYSTEM32\ntdll.dll (unknown line)
Allocations: 3165221 (Pool: 3162026; Big: 3195); GC: 5