From: monojenkins Date: Sun, 23 Feb 2020 13:11:53 +0000 (-0500) Subject: [interp] Pop leave and calli_nat frames. (#32691) X-Git-Tag: submit/tizen/20210909.063632~9545 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=19b77743962ac0a25c77132691eaeaa25a11f5ef;p=platform%2Fupstream%2Fdotnet%2Fruntime.git [interp] Pop leave and calli_nat frames. (#32691) Co-authored-by: Jay Krell --- diff --git a/src/mono/mono/mini/interp/interp.c b/src/mono/mono/mini/interp/interp.c index 4aa8e5d..05f6419 100644 --- a/src/mono/mono/mini/interp/interp.c +++ b/src/mono/mono/mini/interp/interp.c @@ -3682,7 +3682,6 @@ main_loop: if (csignature->hasthis) --sp; - // FIXME Free this frame earlier? InterpFrame* const child_frame = alloc_frame (context, &retval, frame, NULL, sp, retval); if (frame->imethod->method->dynamic && csignature->pinvoke) { @@ -3691,6 +3690,9 @@ main_loop: const gboolean save_last_error = ip [-3 + 2]; ves_pinvoke_method (child_frame, csignature, (MonoFuncV) code, context, save_last_error); } + + pop_frame (context, child_frame); + CHECK_RESUME_STATE (context); if (csignature->ret->type != MONO_TYPE_VOID) { @@ -6293,9 +6295,9 @@ call_newobj: gboolean const check = opcode == MINT_LEAVE_CHECK || opcode == MINT_LEAVE_S_CHECK; if (check && frame->imethod->method->wrapper_type != MONO_WRAPPER_RUNTIME_INVOKE) { - // FIXME Free this frame earlier? InterpFrame* const child_frame = alloc_frame (context, &dummy, frame, NULL, NULL, NULL); MonoException *abort_exc = mono_interp_leave (child_frame); + pop_frame (context, child_frame); if (abort_exc) THROW_EX (abort_exc, frame->ip); }