Skip to content

Commit 1aa10a7

Browse files
authored
[mono][jit] Avoid an assert when using unmanaged generic calli in gshared methods. (#99355)
1 parent add19f1 commit 1aa10a7

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/mono/mono/mini/method-to-ir.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7548,6 +7548,9 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
75487548
if (cfg->compile_aot)
75497549
cfg->pinvoke_calli_signatures = g_slist_prepend_mempool (cfg->mempool, cfg->pinvoke_calli_signatures, fsig);
75507550

7551+
if (fsig->has_type_parameters)
7552+
GENERIC_SHARING_FAILURE (CEE_CALLI);
7553+
75517554
/* Call the wrapper that will do the GC transition instead */
75527555
MonoMethod *wrapper = mono_marshal_get_native_func_wrapper_indirect (method->klass, fsig, cfg->compile_aot);
75537556

0 commit comments

Comments
 (0)