Skip to content

Instantly share code, notes, and snippets.


lambdageek/printf-proxy.diff Secret

Created Mar 24, 2017
What would you like to do?
modified mono/metadata/icall.c
@@ -6381,6 +6381,8 @@ ves_icall_Remoting_RealProxy_GetTransparentProxy (MonoObjectHandle this_obj, Mon
MONO_HANDLE_SETVAL (res, vtable, MonoVTable*, mono_remote_class_vtable (domain, remote_class, rp, error));
if (!is_ok (error))
+ g_assert (!MONO_HANDLE_IS_NULL (res));
+ g_assert (mono_handle_class (res) == mono_defaults.transparent_proxy_class);
return res;
@@ -6388,6 +6390,12 @@ ICALL_EXPORT MonoReflectionType *
ves_icall_Remoting_RealProxy_InternalGetProxyType (MonoTransparentProxy *tp)
MonoError error;
+ g_assert (tp != NULL);
+ MonoClass *klass = mono_object_class (tp);
+ fprintf (stderr, "tp class is %s.%s\n", klass->name_space, klass->name);
+ fprintf (stderr, "tp is %p\n", tp);
+ fprintf (stderr, "remote_class is %p\n", tp->remote_class);
+ fprintf (stderr, "proxy_class is %p\n", tp->remote_class->proxy_class);
MonoReflectionType *ret = mono_type_get_object_checked (mono_object_domain (tp), &tp->remote_class->proxy_class->byval_arg, &error);
mono_error_set_pending_exception (&error);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment