[Mono-dev] crash on first runtime_invoke (using MSVC build)
Virgile Bello
virgile.bello at gmail.com
Fri Jan 14 23:39:57 EST 2011
It crashes with all apps during mono_jit_init[_version] (which use
mono_runtime_invoke internally)
mono-2.0.dll!mono_jit_runtime_invoke(_MonoMethod * method, void * obj, void
* * params, MonoObject * * exc) Line 5700 C
mono-2.0.dll!mono_runtime_invoke(_MonoMethod * method, void * obj, void *
* params, MonoObject * * exc) Line 2727 + 0x18 bytes C
mono-2.0.dll!create_exception_two_strings(_MonoClass * klass, _MonoString
* a1, _MonoString * a2) Line 134 + 0x13 bytes C
mono-2.0.dll!mono_exception_from_name_two_strings(_MonoImage * image,
const char * name_space, const char * name, _MonoString * a1, _MonoString *
a2) Line 157 + 0x11 bytes C
mono-2.0.dll!create_domain_objects(_MonoDomain * domain) Line 177 + 0x1c
bytes C
mono-2.0.dll!mono_runtime_init(_MonoDomain * domain, void (int, void *,
void *)* start_cb, void (int, void *)* attach_cb) Line 261 + 0x9 bytes C
mono-2.0.dll!mini_init(const char * filename, const char *
runtime_version) Line 6514 + 0x13 bytes C
mono-2.0.dll!mono_jit_init_version(const char * domain_name, const char *
runtime_version) Line 2043 + 0xd bytes C
On Sat, Jan 15, 2011 at 9:20 AM, Zoltan Varga <vargaz at gmail.com> wrote:
> 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/c9a10d3f/attachment.html
More information about the Mono-devel-list
mailing list