<HTML><BODY><div>Hi, Sergey!</div><div>Thanks for the explanation!</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;">Понедельник, 23 октября 2023, 12:32 +03:00 от Sergey Kaplun <skaplun@tarantool.org>:<br> <div id=""><div class="js-helper js-readmsg-msg"><div><div id="style_16980535300585403873_BODY">Hi, Maxim!<br>Thanks for the review!<br>Please, consider my answers below.<br><br>On 13.10.23, Maxim Kokryashkin wrote:<br>> Hi, Sergey!<br>> Thanks for the patch!<br>> LGTM, except for a few nits below.<br>> On Wed, Oct 11, 2023 at 06:04:09PM +0300, Sergey Kaplun wrote:<br>> > From: Mike Pall <mike><br>> ><br>> > Analyzed by Sergey Kaplun.<br>> ><br>> > (cherry-picked from commit b7a8c7c184257858699454408420dd5f0b6c8a75)<br>> ><br>> > Assume we have parent and child traces with the following IRs from the<br>> > IR dump:<br>> ><br>> > Parent:<br>> > | 0009 rax > tab TNEW 0 0<br>> > | 0010 p32 FLOAD 0008 tab.node<br>> > | 0011 p32 HREFK 0010 "Name" @1<br>> > | 0012 {0008} tab HSTORE 0011 0009<br>> > | .... SNAP 2 [ ---- 0001 0002 0008 ---- ]<br>> > | 0013 {sink} tab TNEW 0 0<br>> > | 0014 {0008} fal HSTORE 0011 false<br>> > | .... SNAP 3 [ ---- 0001 0002 0008 ---- ]<br>> ><br>> > Child:<br>> > | 0001 r15 tab SLOAD 1 PI<br>> > | 0002 rbp tab SLOAD 2 PI<br>> > | 0003 tab PVAL 9<br>> ><br>> > As we can see from the trace dump above, the `rax` register is missing<br>> > in the `0003 PVAL` IR for the side trace -- so it is assumed to be<br>> > available in the allow RegSet inside `asm_stack_check()` and its value<br>> > is spoiled during this check, so if we are restoring from the 3rd<br>> Typo: s/spoiled/spilled/<br><br>I mean spoiled (damaged) (with incorrect value) here -- there is no spill, but<br>incorrect value as `ir->r`.<br><br>> > snapshot by stack overflow -- we are in trouble.<br>> ><br>> > The moment when IR is spoiled is when we set a hint on the register<br>> Typo: s/spoiled/spilled/<br><br>Ditto.<br><br>> > inherited from the parent trace (see `asm_setup_regsp()` for details).<br><br><snipped><br><br>> ><br><br>--<br>Best regards,<br>Sergey Kaplun</div></div></div></div></blockquote><div> </div></BODY></HTML>