Hi, Sergey! Thanks for the review! Fixed your comment, branch is force-pushed.     -- Best regards, Maxim Kokryashkin     >Вторник, 3 октября 2023, 21:55 +03:00 от Sergey Bronnikov : >  > >On 9/29/23 09:20, Maxim Kokryashkin wrote: >> This reverts commit ed412cd9f55fe87fd32a69c86e1732690fc5c1b0. >> >> As was mentioned in tarantool/tarantool#6189, throwing an error >> not on the currently executed coroutine is a violation of the >> Lua/C API. This patch is a part of the patchset that supports >> this violation and is reverted because of it. >Ditto. >> Part of tarantool/tarantool#6323 >> --- >> src/vm_x64.dasc | 1 - >> src/vm_x86.dasc | 2 -- >> 2 files changed, 3 deletions(-) >> >> diff --git a/src/vm_x64.dasc b/src/vm_x64.dasc >> index 116716ac..399dfcbf 100644 >> --- a/src/vm_x64.dasc >> +++ b/src/vm_x64.dasc >> @@ -535,7 +535,6 @@ static void build_subroutines(BuildCtx *ctx) >> |->vm_unwind_c_eh: // Landing pad for external unwinder. >> | mov L:RB, SAVE_L >> | mov GL:RB, L:RB->glref >> - | mov [GL:RB->cur_L], L:RB >> | mov dword GL:RB->vmstate, ~LJ_VMST_CFUNC >> | mov DISPATCH, GL:RB // Setup pointer to dispatch table. >> | add DISPATCH, GG_G2DISP >> diff --git a/src/vm_x86.dasc b/src/vm_x86.dasc >> index e3fbf751..9fa9a3f7 100644 >> --- a/src/vm_x86.dasc >> +++ b/src/vm_x86.dasc >> @@ -683,7 +683,6 @@ static void build_subroutines(BuildCtx *ctx) >> |->vm_unwind_c_eh: // Landing pad for external unwinder. >> | mov L:RB, SAVE_L >> | mov GL:RB, L:RB->glref >> - | mov dword GL:RB->cur_L, L:RB >> | mov dword GL:RB->vmstate, ~LJ_VMST_CFUNC >> | mov DISPATCH, GL:RB // Setup pointer to dispatch table. >> | add DISPATCH, GG_G2DISP >> @@ -719,7 +718,6 @@ static void build_subroutines(BuildCtx *ctx) >> | add DISPATCH, GG_G2DISP >> | mov PC, [BASE-4] // Fetch PC of previous frame. >> | mov dword [BASE-4], LJ_TFALSE // Prepend false to error message. >> - | mov [DISPATCH+DISPATCH_GL(cur_L)], L:RB >> | // INTERP until jump to BC_RET* or return to C. >> | set_vmstate INTERP >> | jmp ->vm_returnc // Increments RD/MULTRES and returns.