-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Closed
Labels
bugIndicates an unexpected problem or unintended behaviorIndicates an unexpected problem or unintended behavior
Description
The following script segfaults (reliably on my x86 mac, sporadically on arm) for any input N where N ≥ 2^31 && N % 16 ≠ 0.
N = 2^31+1
open("test.data", "w") do io
truncate(io, N)
end
s = String(read("test.data"))
@show objectid(s)I discovered this working with (unintentionally) large strings that were constructed in code rather than read from a file, but I haven't been able to reproduce the bug minimally without a read.
➜ dev git:(master) ✗ jd fault.jl
[43504] signal (11.1): Segmentation fault: 11
in expression starting at julia/dev/fault.jl:9
MurmurHash3_x64_128 at julia/dev/src/support/MurmurHash3.c:277
memhash_seed at julia/dev/src/support/hashing.c:74
objectid at ./reflection.jl:359
unknown function (ip: 0x119404ac2)
_jl_invoke at julia/dev/src/gf.c:0 [inlined]
ijl_apply_generic at julia/dev/src/gf.c:2873
jl_apply at julia/dev/src/./julia.h:1880 [inlined]
do_call at julia/dev/src/interpreter.c:125
eval_body at julia/dev/src/interpreter.c:0
jl_interpret_toplevel_thunk at julia/dev/src/interpreter.c:758
jl_toplevel_eval_flex at julia/dev/src/toplevel.c:910
jl_toplevel_eval_flex at julia/dev/src/toplevel.c:853
ijl_toplevel_eval at julia/dev/src/toplevel.c:919 [inlined]
ijl_toplevel_eval_in at julia/dev/src/toplevel.c:969
eval at ./boot.jl:370 [inlined]
include_string at ./loading.jl:1850
_jl_invoke at julia/dev/src/gf.c:0 [inlined]
ijl_apply_generic at julia/dev/src/gf.c:2873
_include at ./loading.jl:1910
include at ./Base.jl:457
jfptr_include_26413 at julia/dev/usr/lib/julia/sys.dylib (unknown line)
_jl_invoke at julia/dev/src/gf.c:0 [inlined]
ijl_apply_generic at julia/dev/src/gf.c:2873
exec_options at ./client.jl:307
_start at ./client.jl:522
jfptr__start_55134 at julia/dev/usr/lib/julia/sys.dylib (unknown line)
_jl_invoke at julia/dev/src/gf.c:0 [inlined]
ijl_apply_generic at julia/dev/src/gf.c:2873
jl_apply at julia/dev/src/./julia.h:1880 [inlined]
true_main at julia/dev/src/jlapi.c:573
jl_repl_entrypoint at julia/dev/src/jlapi.c:717
Allocations: 23154 (Pool: 23120; Big: 34); GC: 1
[1] 43504 segmentation fault jd fault.jl
➜ dev git:(master) ✗ jd
_
_ _ _(_)_ | Documentation: https://docs.julialang.org
(_) | (_) (_) |
_ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg help.
| | | | | | |/ _` | |
| | |_| | | | (_| | | Version 1.10.0-DEV.503 (2023-02-06)
_/ |\__'_|_|_|\__'_| | Commit a7317c3c72* (0 days old master)
|__/ |
julia> versioninfo()
Julia Version 1.10.0-DEV.503
Commit a7317c3c72* (2023-02-06 13:15 UTC)
Platform Info:
OS: macOS (x86_64-apple-darwin22.2.0)
CPU: 12 × Intel(R) Core(TM) i5-10500 CPU @ 3.10GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-14.0.6 (ORCJIT, skylake)
Threads: 1 on 12 virtual cores
Metadata
Metadata
Assignees
Labels
bugIndicates an unexpected problem or unintended behaviorIndicates an unexpected problem or unintended behavior