[mono] Pass 'vtable' to imt_thunk_builder. (#50108)
authorZoltan Varga <vargaz@gmail.com>
Tue, 23 Mar 2021 20:33:03 +0000 (16:33 -0400)
committerGitHub <noreply@github.com>
Tue, 23 Mar 2021 20:33:03 +0000 (16:33 -0400)
This worked on most platforms which ignored that argument, but crashes
on wasm which calls mini_llvmonly_get_imt_trampoline ().

src/mono/mono/metadata/object.c

index 85a9e1e..6378bfc 100644 (file)
@@ -1812,7 +1812,7 @@ mono_method_add_generic_virtual_invocation (MonoVTable *vtable,
 
                        sorted = imt_sort_slot_entries (entries);
 
-                       *vtable_slot = imt_trampoline_builder (NULL, (MonoIMTCheckItem**)sorted->pdata, sorted->len,
+                       *vtable_slot = imt_trampoline_builder (vtable, (MonoIMTCheckItem**)sorted->pdata, sorted->len,
                                                                                                   vtable_trampoline);
 
                        while (entries) {