You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the debugger is asked to invoke an interface or virtual
method on a class the mono_object_get_virtual_method_internal
will assert & abort (or crash).
mono_object_get_virtual_method_internal assumes that
it is being asked to invoke a virtual method on an instance
that implements it. If that's not true it will assert & abort or
access invalid memory if assertions are disabled.
To protect against this we check if the this_arg can be cast to
the interface or base class type. If it can then we should be
safe to call mono_object_get_virtual_method_internal.
PRINT_DEBUG_MSG (1, "[%p] Error: invoke with INVOKE_FLAG_VIRTUAL flag set without this argument.\n", (gpointer) (gsize) mono_native_thread_id_get ());
6557
6561
returnERR_INVALID_ARGUMENT;
6558
6562
}
6563
+
if (!mono_object_isinst_checked(this_arg, m->klass, error)) {
6564
+
PRINT_DEBUG_MSG (1, "[%p] Error: invoke with INVOKE_FLAG_VIRTUAL flag on object that object that doesn't implement the method.\n", (gpointer) (gsize) mono_native_thread_id_get ());
0 commit comments