Skip to content

Commit ed5137a

Browse files
authored
[aot] Avoid creating runtime invoke wrappers for methods which return a byreflike type, the return value cannot be boxed. (#47033)
1 parent d1224fc commit ed5137a

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
@@ -4578,7 +4578,7 @@ add_wrappers (MonoAotCompile *acfg)
45784578
if ((sig->ret->type == MONO_TYPE_PTR) ||
45794579
(sig->ret->type == MONO_TYPE_TYPEDBYREF))
45804580
skip = TRUE;
4581-
if (mono_class_is_open_constructed_type (sig->ret))
4581+
if (mono_class_is_open_constructed_type (sig->ret) || m_class_is_byreflike (mono_class_from_mono_type_internal (sig->ret)))
45824582
skip = TRUE;
45834583

45844584
for (j = 0; j < sig->param_count; j++) {

0 commit comments

Comments
 (0)