Skip to content

Commit 2023102

Browse files
matouskozakpull[bot]
authored andcommitted
[mono] Add missing return in mono_type_to_load_membase (#106798)
There was a missing return for MONO_TYPE_VALUETYPE in mono_type_to_load_membase. It works correctly even without this fix but only by coincidence because the following case is MONO_TYPE_TYPEDBYREF which returns the same OP_LOADV_MEMBASE op code.
1 parent 76e4552 commit 2023102

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/mono/mono/mini/mini.c

+1
Original file line numberDiff line numberDiff line change
@@ -420,6 +420,7 @@ mono_type_to_load_membase (MonoCompile *cfg, MonoType *type)
420420
case MONO_TYPE_VALUETYPE:
421421
if (mini_class_is_simd (cfg, mono_class_from_mono_type_internal (type)))
422422
return OP_LOADX_MEMBASE;
423+
return OP_LOADV_MEMBASE;
423424
case MONO_TYPE_TYPEDBYREF:
424425
return OP_LOADV_MEMBASE;
425426
case MONO_TYPE_GENERICINST:

0 commit comments

Comments
 (0)