[Tarantool-patches] [PATCH luajit] Fix debug.debug() for non-string errors.
Igor Munkin
imun at tarantool.org
Thu Jun 30 15:10:11 MSK 2022
Sergey,
I've checked the patch into all long-term branches in tarantool/luajit
and bumped a new version in master, 2.10 and 1.10.
On 30.12.21, Sergey Kaplun wrote:
> From: Mike Pall <mike>
>
> (cherry picked from f5b0fff5a990004375ad43aa6e6c4a11a8b6eb7e)
>
> `lua_tostring()` returns NULL for non-string and non-number objects.
> Returned value is passed to `fputs()` without check, so that leads to
> crash in case of NULL.
>
> This patch adds the corresponding check. "(error object is not a
> string)" is returned in the aforementioned case.
>
> Sergey Kaplun:
> * added the description and the test for the problem
>
> Part of tarantool/tarantool#6548
> ---
>
> Related issue: https://github.com/tarantool/tarantool/issues/6548
> Branch: https://github.com/tarantool/luajit/tree/skaplun/gh-noticket-debug-debug-non-string-err
> Tarantool branch: https://github.com/tarantool/tarantool/tree/skaplun/gh-noticket-debug-debug-non-string-err-full-ci
>
> src/lib_debug.c | 3 ++-
> .../debug-non-string-error.test.lua | 26 +++++++++++++++++++
> 2 files changed, 28 insertions(+), 1 deletion(-)
> create mode 100644 test/tarantool-tests/debug-non-string-error.test.lua
>
<snipped>
> --
> 2.34.1
>
--
Best regards,
IM
More information about the Tarantool-patches
mailing list