From 9616971c705b4ad2422bc4bb9de834f8bcb9c83b Mon Sep 17 00:00:00 2001 From: dearblue Date: Fri, 8 Mar 2024 21:56:00 +0900 Subject: [PATCH] Fix wrong assertion in `OP_SENDB`. Assertions were failing on exit if started with `mrb_fiber_resume()`. The bug that caused it was introduced by commit 42308c42b548c30e54663e70902fc3eca7b22ea8 (#6106). The bug was moved by commit 990e18ad59e8428bd644559d852a3842994b7e94. --- src/vm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vm.c b/src/vm.c index ae10ed707..c50dd56bf 100644 --- a/src/vm.c +++ b/src/vm.c @@ -1912,7 +1912,6 @@ RETRY_TRY_BLOCK: } /* cfunc epilogue */ - mrb_assert(mrb->c->ci > mrb->c->cibase); mrb_gc_arena_shrink(mrb, ai); if (mrb->exc) goto L_RAISE; ci = mrb->c->ci; @@ -1929,6 +1928,7 @@ RETRY_TRY_BLOCK: syms = irep->syms; } } + mrb_assert(ci > mrb->c->cibase); ci->stack[0] = recv; /* pop stackpos */ ci = cipop(mrb);