[Tarantool-patches] [PATCH luajit] Avoid assertion in case of stack overflow from stitched trace.
Igor Munkin
imun at tarantool.org
Thu Feb 15 16:42:04 MSK 2024
Max,
I've checked the patchset into all long-term branches in
tarantool/luajit and bumped a new version in master, release/3.0 and
release/2.11.
On 14.12.23, Maxim Kokryashkin via Tarantool-patches wrote:
> From: Mike Pall <mike>
>
> Reported by Sergey Bronnikov. Fixed by Sergey Kaplun.
>
> (cherry-picked from commit 1d75cd4d7be638babe6d4e47bf73ea05fc65d81c)
>
> When we exit from a stitched trace due to the Lua stack overflow
> error, the Lua and JIT stacks are not synchronized, and they
> won't be as long as the mentioned error is raised. Because of
> that, we get the incorrect bytecode instruction in
> `debug_framepc`. This patch fixes this behavior, so the
> `debug_framepc` now returns `NO_BCPOS` for this case.
>
> Maxim Kokryashkin:
> * added the description and the test for the problem
>
> Part of tarantool/tarantool#9145
> ---
> Branch: https://github.com/tarantool/luajit/tree/fckxorg/lj-913-avoid-assertion-stkov-from-stitched-trace
> PR: https://github.com/tarantool/tarantool/pull/9484
> Issues: https://github.com/tarantool/tarantool/issues/9145
> https://github.com/LuaJIT/LuaJIT/issues/913
>
> src/lj_debug.c | 9 +++++---
> ...-913-stackoverflow-stitched-trace.test.lua | 23 +++++++++++++++++++
> 2 files changed, 29 insertions(+), 3 deletions(-)
> create mode 100644 test/tarantool-tests/lj-913-stackoverflow-stitched-trace.test.lua
>
<snipped>
> --
> 2.43.0
>
--
Best regards,
IM
More information about the Tarantool-patches
mailing list