JuliaDebug / JuliaInterpreter.jl

Interpreter for Julia code
Other
158 stars 33 forks source link

v1.12: JuliaInterpreter optimization seems to badly interact with new compressed linetable format #622

Open aviatesk opened 3 months ago

aviatesk commented 3 months ago

It looks like this "optimization" introduces a very bad interaction with the new lineinfo format: https://github.com/JuliaDebug/JuliaInterpreter.jl/blob/28dd37ce0f7bcb357bfb820b1d6b53b98aa3796c/src/optimize.jl#L76-L92

julia> using JuliaInterpreter

julia> fnone1() = nothing;

julia> let m = only(methods(fnone1))
           JuliaInterpreter.FrameCode(m, JuliaInterpreter.get_source(m); optimize=true).src.debuginfo
       end
Core.DebugInfo(Symbol("REPL[2]"), nothing, svec(), "\x01\0\0\0\0\0\0\0\0\0\0\0\x01\x01\0")

julia> fnone2() = nothing;

julia> let m = only(methods(fnone2))
           JuliaInterpreter.FrameCode(m, JuliaInterpreter.get_source(m); optimize=true).src.debuginfo
       end
Core.DebugInfo(Symbol("REPL[4]"), nothing, svec(), "")

Originally posted by @aviatesk in https://github.com/JuliaDebug/JuliaInterpreter.jl/issues/606#issuecomment-2012195722