From: Zoltan Varga Date: Wed, 16 Mar 2016 09:54:02 +0000 (+0100) Subject: Merge pull request #2454 from tastywheattasteslikechicken/FixVtableAbort X-Git-Url: http://wien.tomnetworks.com/gitweb/?p=mono.git;a=commitdiff_plain;h=a341404ecdd3b5ca2ed0ab1e9a5bcb9b5ccd2566 Merge pull request #2454 from tastywheattasteslikechicken/FixVtableAbort [runtime] Fixes an abort caused by a TypeLoadException in certain ins… --- a341404ecdd3b5ca2ed0ab1e9a5bcb9b5ccd2566 diff --cc mono/mini/mini-runtime.c index 6a9f054864b,bb4181859b6..136239a1211 --- a/mono/mini/mini-runtime.c +++ b/mono/mini/mini-runtime.c @@@ -2005,12 -1890,22 +2005,18 @@@ mono_jit_compile_method_with_opt (MonoM /* We can't use a domain specific method in another domain */ if (! ((domain != target_domain) && !info->domain_neutral)) { MonoVTable *vtable; - MonoException *tmpEx; mono_jit_stats.methods_lookups++; - vtable = mono_class_vtable (domain, method->klass); + + vtable = mono_class_vtable_full (domain, method->klass, ex == NULL); + if (ex && method->klass->exception_type) { + *ex = mono_class_get_exception_for_failure (method->klass); + return NULL; + } + g_assert (vtable); - tmpEx = mono_runtime_class_init_full (vtable, ex == NULL); - if (tmpEx) { - *ex = tmpEx; + if (!mono_runtime_class_init_full (vtable, error)) return NULL; - } return mono_create_ftnptr (target_domain, info->code_start); } }