diff --git a/src/mono/mono/mini/method-to-ir.c b/src/mono/mono/mini/method-to-ir.c index 96ac001f7eb464..151b9dbe6a8c1d 100644 --- a/src/mono/mono/mini/method-to-ir.c +++ b/src/mono/mono/mini/method-to-ir.c @@ -6080,6 +6080,14 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b seq_points = FALSE; } + if (method->wrapper_type == MONO_WRAPPER_OTHER) { + WrapperInfo *info = mono_marshal_get_wrapper_info (method); + if (info->subtype == WRAPPER_SUBTYPE_INTERP_IN) { + /* We could hit a seq point before attaching to the JIT (#8338) */ + seq_points = FALSE; + } + } + if (cfg->prof_coverage) { if (cfg->compile_aot) g_error ("Coverage profiling is not supported with AOT.");