Skip to content

Commit

Permalink
[mono][interp] Avoid tiering up methods while running clauses.
Browse files Browse the repository at this point in the history
The IL offsets in the clause_args argument become out-of-date after tiering up.
  • Loading branch information
vargaz committed Oct 11, 2022
1 parent 95654d0 commit 0e1d606
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/mono/mono/mini/interp/interp.c
Original file line number Diff line number Diff line change
Expand Up @@ -7078,15 +7078,15 @@ MINT_IN_CASE(MINT_BRTRUE_I8_SP) ZEROP_SP(gint64, !=); MINT_IN_BREAK;

MINT_IN_CASE(MINT_TIER_ENTER_METHOD) {
frame->imethod->entry_count++;
if (frame->imethod->entry_count > INTERP_TIER_ENTRY_LIMIT)
if (frame->imethod->entry_count > INTERP_TIER_ENTRY_LIMIT && !clause_args)
ip = mono_interp_tier_up_frame_enter (frame, context);
else
ip++;
MINT_IN_BREAK;
}
MINT_IN_CASE(MINT_TIER_PATCHPOINT) {
frame->imethod->entry_count++;
if (frame->imethod->entry_count > INTERP_TIER_ENTRY_LIMIT)
if (frame->imethod->entry_count > INTERP_TIER_ENTRY_LIMIT && !clause_args)
ip = mono_interp_tier_up_frame_patchpoint (frame, context, ip [1]);
else
ip += 2;
Expand Down

0 comments on commit 0e1d606

Please sign in to comment.