<HTML><BODY><div>Hi, Sergey!</div><div>Thanks for the fixes!</div><div>LGTM</div><div data-signature-widget="container"><div data-signature-widget="content"><div>--<br>Best regards,</div><div>Maxim Kokryashkin</div></div></div><div> </div><div> </div><blockquote style="border-left:1px solid #0857A6; margin:10px; padding:0 0 0 10px;">Среда, 16 августа 2023, 17:25 +03:00 от Sergey Kaplun <skaplun@tarantool.org>:<br> <div id=""><div class="js-helper js-readmsg-msg"><div><div id="style_16921959111968049259_BODY">Hi, Maxim!<br>Thanks for the review!<br><br>On 15.08.23, Maxim Kokryashkin wrote:<br>> Hi, Sergey!<br>> Thanks for the patch!<br>> Please consider my comments below.<br>><br>> On Wed, Aug 09, 2023 at 06:36:03PM +0300, Sergey Kaplun via Tarantool-patches wrote:<br>> > From: Mike Pall <mike><br>> ><br>> > Thanks to Sergey Ostanevich.<br>> ><br>> > (cherry-picked from commit 0cd643d7cfc21bc8b6153d42b86a71d557270988)<br>> ><br>> > This patch just reverts the commit<br>> > 48f463e613db6264bfa9acb581fe1ca702ea38eb ("luajit: fox for<br>> > debug.getinfo(1,'>S')") and applies the one from the main repo for the<br>> Typo: s/for the/for/<br><br>Fixed.<br><br>> > consistency with the upstream.<br>> > ---<br>> > src/lj_debug.c | 16 ++++++----------<br>> > 1 file changed, 6 insertions(+), 10 deletions(-)<br>><br>> Since there were no test with the original fix, it would be nice to<br>> add one.<br><br>Added, see iterative diff below:<br><br>===================================================================<br>diff --git a/test/tarantool-tests/lj-509-debug-getinfo-arguments-check.test.lua b/test/tarantool-tests/lj-509-debug-getinfo-arguments-check.test.lua<br>new file mode 100644<br>index 00000000..a50b80e4<br>--- /dev/null<br>+++ b/test/tarantool-tests/lj-509-debug-getinfo-arguments-check.test.lua<br>@@ -0,0 +1,13 @@<br>+local tap = require('tap')<br>+<br>+-- Test file to demonstrate crash in the `debug.getinfo()` call.<br>+-- See also: <a href="https://github.com/LuaJIT/LuaJIT/issues/509" target="_blank">https://github.com/LuaJIT/LuaJIT/issues/509</a>.<br>+local test = tap.test('lj-509-debug-getinfo-arguments-check.test.lua')<br>+test:plan(2)<br>+<br>+-- '>' expects to have an extra argument on the stack.<br>+local res, err = pcall(debug.getinfo, 1, '>S')<br>+test:ok(not res, 'check result of the call with invalid arguments')<br>+test:like(err, 'bad argument', 'check the error message')<br>+<br>+test:done(true)<br>===================================================================<br><br>> ><br><br><snipped><br><br>> > 2.41.0<br>> Best regards,<br>> Maxim Kokryashkin<br>> ><br><br>--<br>Best regards,<br>Sergey Kaplun</div></div></div></div></blockquote><div> </div></BODY></HTML>