julia icon indicating copy to clipboard operation
julia copied to clipboard

fix C struct definition of LineInfoNode

Open vtjnash opened this issue 3 years ago • 3 comments

Fix regression introduced by #44548. Fix #45310.

Found via rr trace in https://buildkite.com/julialang/julia-master/builds/14475#01825f4d-8c0c-4f70-938c-cd1c8ee4d202, resulting in a compiler error test calling jlbacktrace, and dereferencing invalid memory, if the object happened not to be zero initialized. Otherwise, if the undefined memory was zero initialized, it would probably instead just be missing inlined frames.

vtjnash avatar Aug 09 '22 17:08 vtjnash

LGTM, I don't know of a way we could automatically do some checks for errors like these, but that might be something to keep in mind

gbaraldi avatar Aug 09 '22 17:08 gbaraldi

Sorry about that. :(

KristofferC avatar Aug 09 '22 17:08 KristofferC

we can try to add some more assert(sizeof foo == jl_datatype_size foo && "layout consistency check fail"), but unsure if that would have really worked to catch this

vtjnash avatar Aug 09 '22 18:08 vtjnash

I don't think this commit is on 1.8.

KristofferC avatar Aug 10 '22 13:08 KristofferC