Open jishnub opened 1 month ago
julia> zeros(-1) ERROR: ArgumentError: invalid GenericMemory size: too large for system address width Stacktrace: [1] GenericMemory @ ./boot.jl:538 [inlined] [2] Array @ ./boot.jl:598 [inlined] [3] Array @ ./boot.jl:611 [inlined] [4] zeros @ ./array.jl:579 [inlined] [5] zeros @ ./array.jl:576 [inlined] [6] zeros(dims::Int64) @ Base ./array.jl:574 [7] top-level scope @ REPL[1]:1 julia> versioninfo() Julia Version 1.12.0-DEV.1034 Commit 7e809b0953c (2024-08-10 04:31 UTC) Build Info: Official https://julialang.org/ release Platform Info: OS: Linux (x86_64-linux-gnu) CPU: 8 × Intel(R) Core(TM) i5-10310U CPU @ 1.70GHz WORD_SIZE: 64 LLVM: libLLVM-18.1.7 (ORCJIT, skylake) Threads: 1 default, 0 interactive, 1 GC (on 8 virtual cores) Environment: JULIA_EDITOR = subl
The message here might be a bit clearer, and point to the fact that the size cannot be negative.
The error stems from here: https://github.com/JuliaLang/julia/blob/0a26e908e77f147a5a964735ad02f74d047fe47b/src/genericmemory.c#L159
The message here might be a bit clearer, and point to the fact that the size cannot be negative.