[Tarantool-patches] [PATCH luajit] test: adapt test checking reversed function
Igor Munkin
imun at tarantool.org
Fri Feb 18 22:04:53 MSK 2022
Max,
Thanks for the patch!
On 11.10.21, Максим Корякшин wrote:
>
> Hi! Thanks for the comments.
>
> I agree that it is strange to add this test, as long as it does not test
> anything, so I propose to remove it.
Why do you think this test checks nothing? It checks <string.gsub> with
recursive handler. If author wanted to check deep recursion exception,
he would add <pcall> at least (if Lua successfully handles this).
I propose to apply the original fix[1], but adjust the comment
considering Sergey review: it provides the description, why we can't use
the original test, or at least add <pcall> to avoid the crash.
>
> Best regards,
> Maxim Kokryashkin
>
> >
> >>Hi, Maxim!
> >>
> >>Thanks for the patch!
> >>
> >>Please consider my comments below.
> >>
> >>On 30.09.21, Maxim Kokryashkin wrote:
> >>> The first fiber in Tarantool has only 512Kb of the stack which is not enough to
> >>> handle such a deep call chain.
> >>> The test is adapted to Tarantool by decreasing the string length.
> >>>
> >>> Closes tarantool/tarantool#5782
Typo: s/Closes/Resolves/.
> >>> Part of tarantool/tarantool#5845
> >>> Part of tarantool/tarantool#4473
Minor: Replace both tags above with "Part of tarantool/tarantool/5870".
> >>
> >>Looks like it should be 5870 instead 4473. Also, 5845 is already
> >>closed.
> >>
> >>> ---
> >>
> >>Please show the Tarantool branch as well, to show that problem is gone.
> >>
> >>> GitHub branch: https://github.com/tarantool/luajit/tree/fckxorg/gh-5782-adapt-deep-nest-gsub-PUC-Rio
> >>> Issue: https://github.com/tarantool/tarantool/issues/5782
> >>>
> >>> test/PUC-Rio-Lua-5.1-tests/pm.lua | 9 ++++-----
> >>> 1 file changed, 4 insertions(+), 5 deletions(-)
> >>>
<snipped>
> >>> --
> >>> 2.33.0
> >>>
> >>
> >>--
> >>Best regards,
> >>Sergey Kaplun
> >
[1]: https://lists.tarantool.org/tarantool-patches/20210930114337.1575120-1-m.kokryashkin@tarantool.org/
--
Best regards,
IM
More information about the Tarantool-patches
mailing list