Open MilesCranmer opened 3 weeks ago
Could be this: https://github.com/JuliaLang/julia/pull/43306? I don't see any other matching changes.
Reproducible without the internal RefValue
:
julia> struct Node{D}
children::NTuple{D,Memory{Node{D}}}
Node(::Val{_D}) where {_D} = new{_D}()
end
julia> Node(Val(2))
[225608] signal 11 (1): Segmentation fault
in expression starting at REPL[2]:1
jl_compute_field_offsets at /cache/build/builder-amdci5-7/julialang/julia-master/src/datatype.c:621
jl_struct_try_layout at /cache/build/builder-amdci5-7/julialang/julia-master/src/datatype.c:352 [inlined]
jl_struct_try_layout at /cache/build/builder-amdci5-7/julialang/julia-master/src/datatype.c:345
jl_datatype_isinlinealloc at /cache/build/builder-amdci5-7/julialang/julia-master/src/datatype.c:359
union_isinlinable at /cache/build/builder-amdci5-7/julialang/julia-master/src/datatype.c:384 [inlined]
union_isinlinable at /cache/build/builder-amdci5-7/julialang/julia-master/src/datatype.c:373 [inlined]
ijl_islayout_inline at /cache/build/builder-amdci5-7/julialang/julia-master/src/datatype.c:407
jl_get_genericmemory_layout at /cache/build/builder-amdci5-7/julialang/julia-master/src/datatype.c:506
jl_compute_field_offsets at /cache/build/builder-amdci5-7/julialang/julia-master/src/datatype.c:602
inst_datatype_inner at /cache/build/builder-amdci5-7/julialang/julia-master/src/jltypes.c:2238
:+1:
On 1.10.4 here is the lldb
backtrace.
On nightly, this line is https://github.com/JuliaLang/julia/blob/ed987f2603fd96f5ff07f26189b160dd538b7d6e/src/datatype.c#L621
On Julia 1.7.1+, running the following valid code will cause a segfault and crash. Julia 1.7.0 is the last version which is not affected.
with the following traceback
Other info:
I have reproduced this bug on the following versions, on the same machine:
However, the bug is not present on:
So the bug was created sometime between 1.7.0 and 1.7.1: https://github.com/JuliaLang/julia/compare/v1.7.0...v1.7.1