I was expecting the second stack trace line number to be 4 (where the error is thrown), not 2
I think this behavior is caused by the implementation of do_stackframe. The loop_frame is ignored there, I think they should either become a stack trace line because otherwise one of the current_line instructions is lost.
Give this script
The call to nuSuchFunction() throws an error, at which point the luerl stack looks like this:
however, the call to get_stacktrace returns:
I was expecting the second stack trace line number to be 4 (where the error is thrown), not 2
I think this behavior is caused by the implementation of do_stackframe. The loop_frame is ignored there, I think they should either become a stack trace line because otherwise one of the current_line instructions is lost.