From: Zoltan Varga Date: Fri, 2 Jun 2017 15:54:54 +0000 (-0400) Subject: [jit] Avoid running class cctors for remoting wrappers in the source domain. Fixes... X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=commitdiff_plain;h=cfdbdfc9eb98ad94730be8ddd53e66993386e15c;p=mono.git [jit] Avoid running class cctors for remoting wrappers in the source domain. Fixes #56821. (#4950) --- diff --git a/mono/mini/mini.c b/mono/mini/mini.c index b2f16b7fe47..10d6eac8b16 100644 --- a/mono/mini/mini.c +++ b/mono/mini/mini.c @@ -4335,8 +4335,12 @@ mono_jit_compile_method_inner (MonoMethod *method, MonoDomain *target_domain, in } } - if (!mono_runtime_class_init_full (vtable, error)) - return NULL; + if (!(method->wrapper_type == MONO_WRAPPER_REMOTING_INVOKE || + method->wrapper_type == MONO_WRAPPER_REMOTING_INVOKE_WITH_CHECK || + method->wrapper_type == MONO_WRAPPER_XDOMAIN_INVOKE)) { + if (!mono_runtime_class_init_full (vtable, error)) + return NULL; + } return code; }