[Mono-dev] crash on first runtime_invoke (using MSVC build)

Zoltan Varga vargaz at gmail.com
Fri Jan 14 19:20:59 EST 2011


Hi,

  Do you have a testcase, or does this happen with all apps ?

                   Zoltan

On Fri, Jan 14, 2011 at 10:58 PM, Virgile Bello <virgile.bello at gmail.com>wrote:

> Recently, I had some problem with the VS2010 build of mono.
> Runtime check complains ESP is wrong after first time runtime_invoke is
> called.
>
> I traced it back to this single-line commit.
> (Reverting this single line avoids the problem on any version up to master)
>
> 08f0bcaad89540260323f24811cbf896cfe471ed
>
>    Mark runtime invoke wrappers as pinvoke, since they are called from
> native code.
>
> diff --git a/mono/metadata/marshal.c b/mono/metadata/marshal.c
> index 476d129..c586555 100644
> --- a/mono/metadata/marshal.c
> +++ b/mono/metadata/marshal.c
> @@ -4571,6 +4571,7 @@ mono_marshal_get_runtime_invoke (MonoMethod *method,
> gboolean virtual)
>         csig->params [1] = &mono_defaults.int_class->byval_arg;
>         csig->params [2] = &mono_defaults.int_class->byval_arg;
>         csig->params [3] = &mono_defaults.int_class->byval_arg;
> +       csig->pinvoke = 1;
>
>         name = mono_signature_to_name (callsig, virtual ?
> "runtime_invoke_virtual" : "runtime_invoke");
>         mb = mono_mb_new (target_klass, name,
>  MONO_WRAPPER_RUNTIME_INVOKE);
>
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20110115/c0794ce5/attachment.html 


More information about the Mono-devel-list mailing list