Skip to content

Commit 0e1d606

Browse files
committed
[mono][interp] Avoid tiering up methods while running clauses.
The IL offsets in the clause_args argument become out-of-date after tiering up.
1 parent 95654d0 commit 0e1d606

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/mono/mono/mini/interp/interp.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7078,15 +7078,15 @@ MINT_IN_CASE(MINT_BRTRUE_I8_SP) ZEROP_SP(gint64, !=); MINT_IN_BREAK;
70787078

70797079
MINT_IN_CASE(MINT_TIER_ENTER_METHOD) {
70807080
frame->imethod->entry_count++;
7081-
if (frame->imethod->entry_count > INTERP_TIER_ENTRY_LIMIT)
7081+
if (frame->imethod->entry_count > INTERP_TIER_ENTRY_LIMIT && !clause_args)
70827082
ip = mono_interp_tier_up_frame_enter (frame, context);
70837083
else
70847084
ip++;
70857085
MINT_IN_BREAK;
70867086
}
70877087
MINT_IN_CASE(MINT_TIER_PATCHPOINT) {
70887088
frame->imethod->entry_count++;
7089-
if (frame->imethod->entry_count > INTERP_TIER_ENTRY_LIMIT)
7089+
if (frame->imethod->entry_count > INTERP_TIER_ENTRY_LIMIT && !clause_args)
70907090
ip = mono_interp_tier_up_frame_patchpoint (frame, context, ip [1]);
70917091
else
70927092
ip += 2;

0 commit comments

Comments
 (0)