[mono][interp] Fix some issues that are hit in tests when we tier up methods immediat...
authorVlad Brezae <brezaevlad@gmail.com>
Tue, 13 Dec 2022 08:57:50 +0000 (10:57 +0200)
committerGitHub <noreply@github.com>
Tue, 13 Dec 2022 08:57:50 +0000 (10:57 +0200)
* [mono][interp] Fix difference in behavior between tiered and untiered compilation

We were trying to get the vtable only in the tiered compilation case.

* Disable test that hits known interpreter limitation

src/mono/mono/mini/interp/transform.c
src/tests/issues.targets

index 831268c..0530645 100644 (file)
@@ -5754,6 +5754,8 @@ generate_code (TransformData *td, MonoMethod *method, MonoMethodHeader *header,
                                mono_error_set_for_class_failure (error, klass);
                                goto_if_nok (error, exit);
                        }
+                       MonoVTable *vtable = mono_class_vtable_checked (klass, error);
+                       goto_if_nok (error, exit);
 
                        if (mono_class_get_flags (klass) & TYPE_ATTRIBUTE_ABSTRACT) {
                                char* full_name = mono_type_get_full_name (klass);
@@ -5900,8 +5902,6 @@ generate_code (TransformData *td, MonoMethod *method, MonoMethodHeader *header,
                                                interp_ins_set_dreg (newobj_fast, dreg);
                                                newobj_fast->data [1] = GUINTPTR_TO_UINT16 (ALIGN_TO (vtsize, MINT_STACK_SLOT_SIZE));
                                        } else {
-                                               MonoVTable *vtable = mono_class_vtable_checked (klass, error);
-                                               goto_if_nok (error, exit);
                                                td->cbb->contains_call_instruction = TRUE;
                                                newobj_fast = interp_add_ins (td, MINT_NEWOBJ);
                                                interp_ins_set_dreg (newobj_fast, dreg);
index e925f3e..3d63cbd 100644 (file)
         <ExcludeList Include = "$(XunitTestBinBase)/JIT/Regression/JitBlue/GitHub_21990/**">
             <Issue>https://github.com/dotnet/runtime/issues/46622</Issue>
         </ExcludeList>
+        <ExcludeList Include = "$(XunitTestBinBase)/JIT/Regression/JitBlue/Runtime_34170/**">
+            <Issue>https://github.com/dotnet/runtime/issues/46622</Issue>
+        </ExcludeList>
         <ExcludeList Include = "$(XunitTestBinBase)/JIT/Directed/zeroinit/tail/**">
             <Issue>https://github.com/dotnet/runtime/issues/37955</Issue>
         </ExcludeList>