<HTML><BODY><div>Hi, Sergey!</div><div>Thanks for the review!</div><div>Fixed your comments, branch is force-pushed.</div><div>Here is the new commit message:</div><div>===</div><div><div><div>Fix frame for more types of on-trace error messages.</div></div><div> </div><div><div>Thanks to Maxim Kokryashkin.</div></div><div> </div><div><div>(cherry-picked from commit d5bbf9cdb4c5eddc404a90bd44f077cfb3a57a90)</div></div><div> </div><div><div>This patch fixes the same issue with the frame as the previous</div><div>one, but now for the table overflow error in the `err_msgv`</div><div>function. The test for the problem uses the table of GC</div><div>finalizers, although they are not required to reproduce the</div><div>issue. They are only used to make the test as simple as possible.</div></div><div> </div><div><div>Resolves tarantool/tarantool#562</div><div>Part of tarantool/tarantool#8825</div><div>===</div><div> </div><div>And here is the diff:</div><div> </div><div><div><div>diff --git a/test/tarantool-tests/lj-1034-tabov-error-frame.test.lua b/test/tarantool-tests/lj-1034-tabov-error-frame.test.lua</div><div>index b7520d92..0e23fdb2 100644</div><div>--- a/test/tarantool-tests/lj-1034-tabov-error-frame.test.lua</div><div>+++ b/test/tarantool-tests/lj-1034-tabov-error-frame.test.lua</div><div>@@ -6,6 +6,12 @@ local test = tap.test('lj-1034-tabov-error-frame'):skipcond({</div><div>   ['Disabled on MacOS due to #8652'] = jit.os == 'OSX',</div><div> })</div><div> </div><div>+-- XXX: The test for the problem uses the table of GC</div><div>+-- finalizers, although they are not required to reproduce</div><div>+-- the issue. They are only used to make the test as simple</div><div>+-- as possible.</div><div>+--</div><div>+-- XXX: The test requires ~6Gb of memory to see the error.</div><div> test:plan(2)</div><div> </div><div> -- luacheck: no unused</div><div>@@ -13,11 +19,11 @@ local anchor = {}</div><div> local function on_gc(t) end</div><div> </div><div> local function test_finalizers()</div><div>-    local i = 1</div><div>-    while true do</div><div>-        anchor[i] = ffi.gc(ffi.cast('void *', 0), on_gc)</div><div>-        i = i + 1</div><div>-    end</div><div>+  local i = 1</div><div>+  while true do</div><div>+    anchor[i] = ffi.gc(ffi.cast('void *', 0), on_gc)</div><div>+    i = i + 1</div><div>+  end</div><div> end</div><div> </div><div> local st, err = pcall(test_finalizers)</div></div></div></div></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;">Понедельник, 11 сентября 2023, 11:25 +03:00 от Sergey Kaplun via Tarantool-patches <tarantool-patches@dev.tarantool.org>:<br> <div id=""><div class="js-helper js-readmsg-msg"><div><div id="style_16944207492069821753_BODY">Hi, Maxim!<br>Thanks for the patch!<br>LGTM, with a few nits below.<br><br>On 05.09.23, Maxim Kokryashkin wrote:<br>> From: Mike Pall <mike><br>><br>> Thanks to Maxim Kokryashkin.<br>><br>> (cherry-picked from commit d5bbf9cdb4c5eddc404a90bd44f077cfb3a57a90)<br>><br>> This patch fixes the same issue with frame, as the previous<br><br>Typo: s/frame,/the frame/<br><br>> one, but now for the table overflow error in the `err_msgv`<br>> function. The test for the problem uses the table of GC<br>> finalizers, although they are not required to reproduce the<br>> issue. They only used to make the test as simple as possible.<br><br>Typo: s/They only used/They are only used/<br><br>Minor: Feel free to add the similar comment to the test itself.<br><br>><br>> Resolves tarantool/tarantool#562<br>> Part of tarantool/tarantool#8825<br>> ---<br>> src/lj_err.c | 4 +++<br>> .../lj-1034-tabov-error-frame.test.lua | 27 +++++++++++++++++++<br>> 2 files changed, 31 insertions(+)<br>> create mode 100644 test/tarantool-tests/lj-1034-tabov-error-frame.test.lua<br>><br>> diff --git a/src/lj_err.c b/src/lj_err.c<br>> index 763746e6..46fb81ee 100644<br>> --- a/src/lj_err.c<br>> +++ b/src/lj_err.c<br><br><snipped><br><br>> diff --git a/test/tarantool-tests/lj-1034-tabov-error-frame.test.lua b/test/tarantool-tests/lj-1034-tabov-error-frame.test.lua<br>> new file mode 100644<br>> index 00000000..b7520d92<br>> --- /dev/null<br>> +++ b/test/tarantool-tests/lj-1034-tabov-error-frame.test.lua<br>> @@ -0,0 +1,27 @@<br>> +local tap = require('tap')<br>> +local ffi = require('ffi')<br>> +local test = tap.test('lj-1034-tabov-error-frame'):skipcond({<br>> + ['Test requires JIT enabled'] = not jit.status(),<br>> + ['Test requires GC64 mode enabled'] = not ffi.abi('gc64'),<br>> + ['Disabled on MacOS due to #8652'] = jit.os == 'OSX',<br>> +})<br>> +<br>> +test:plan(2)<br>> +<br><br>Side note: The test requires ~6Gb of memory to see the error.<br>Feel free to add the corresponding comment or ignore.<br><br>> +-- luacheck: no unused<br>> +local anchor = {}<br>> +local function on_gc(t) end<br>> +<br>> +local function test_finalizers()<br>> + local i = 1<br>> + while true do<br>> + anchor[i] = ffi.gc(ffi.cast('void *', 0), on_gc)<br>> + i = i + 1<br>> + end<br>> +end<br><br>Minor: Please use 2 spaces for indentation instead.<br><br>> +<br>> +local st, err = pcall(test_finalizers)<br>> +st, err = pcall(test_finalizers)<br>> +test:ok(st == false, 'error handled successfully')<br>> +test:like(err, '^.+table overflow', 'error is table overflow')<br>> +test:done(true)<br>> --<br>> 2.41.0<br>><br><br>--<br>Best regards,<br>Sergey Kaplun</div></div></div></div></blockquote><div> </div></BODY></HTML>