You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fixes#4060. Wrong line numbers inside set_trace_func for end events.
Fixes#4051. Wrong line numbers in Kernel#caller inside set_trace_func (with code to reproduce)
#4051 was largely already fixed but the backtrace elements themselves had the
wrong line (which was why #4060 was opened).
The problem was mri changes their position of class/module/sclass from start
line to end line. We just store start line. They will also look at first
instr/node within the class/module for start line. That solution is memory
efficient but then makes those nodes report wrong lines with -S ast.
Our solution was to just add an endLine field to those nodes. The memory
increase from that is very small so I think it is ok.
The second part of this was that we build backtrace from setting line number
via a line number instr. We had no end line so we couldn't emit one. Now that
we have one we do....but only if --debug is supplied since the only instr after
this point is return and that cannot raise (so we cannot generate a backtrace).
0 commit comments