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@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list