Skip to content

Commit f098387

Browse files
authored
[mono][aot] Avoid an assert when encoding fnptr classes. (#72479)
Fixes #72460.
1 parent 28c56fe commit f098387

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/mono/mono/mini/aot-compiler.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3401,7 +3401,7 @@ encode_klass_ref_inner (MonoAotCompile *acfg, MonoClass *klass, guint8 *buf, gui
34013401
encode_klass_ref (acfg, container->owner.klass, p, &p);
34023402
}
34033403
}
3404-
} else if (m_class_get_byval_arg (klass)->type == MONO_TYPE_PTR) {
3404+
} else if (m_class_get_byval_arg (klass)->type == MONO_TYPE_PTR || m_class_get_byval_arg (klass)->type == MONO_TYPE_FNPTR) {
34053405
encode_value (MONO_AOT_TYPEREF_PTR, p, &p);
34063406
encode_type (acfg, m_class_get_byval_arg (klass), p, &p);
34073407
} else {

0 commit comments

Comments
 (0)