[Mono-devel-list] Problems with the new jit and proxies
dietmar
dietmar at ximian.com
Fri May 9 03:51:18 EDT 2003
On Fri, 2003-05-09 at 01:49, Lluis Sanchez wrote:
> Hi,
>
> I've been tracking down a couple of problems that mini has with transparent
> proxies:
>
> 1) It crashes when creating a proxy based on an interface. This is because
> the method mono_jit_create_remoting_trampoline in mini.c checks if the
> provided method is from a marshalbyref or object class. If it is not, it
> does not create the remoting trampoline. Since the method is from an
> interface, the trampoline is not created and it fails. If I remove the check
> it works. In the old jit this check wasn't there, but I guess there is a
> good reason for it.
I thought I already fixed that yesterday:
if ((method->flags & METHOD_ATTRIBUTE_ABSTRACT) ...
Please can you test with latest CVS.
- Dietmar
>
> 2) When creating a remote object using new, the constructor call does not go
> through the proxy. The runtime makes a direct call to the object (which does
> not exist, because it is a proxy) and crashes. It is because the method
> mono_emit_method_call_spilled for generating the constructor call in the
> CEE_NEWOBJ case is invoked with a NULL value in the "this" parameter:
>
> mono_emit_method_call_spilled (cfg, bblock, cmethod, sp, ip, NULL);
>
> Later, mono_emit_method_call should create a remoting wrapper for the
> method, but it doesn't do it because "this" is null. Changing NULL to sp[0]
> makes it work, but it is just a "guessed" solution :-)
>
> There are other weird problems that I'm still trying to isolate.
>
> - Lluis
>
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
More information about the Mono-devel-list
mailing list