[Mono-list] mono_jit_init and mono_jit_cleanup
fozzie
david_aiken at yahoo.com
Sat Apr 18 14:32:50 EDT 2009
hi all..
I'm embedding mono in a Vista application which accesses multiple
assemblies. For each assembly i call mono_jit_init, make the calls, then
mono_jit_cleanup. The problem is that on the second call to mono_jit_init
there is a crash in ...\mono\mini\mini-x86.c(611):
if (!func) {
ptr = mono_global_codeman_reserve (sizeof (cpuid_impl));
memcpy (ptr, cpuid_impl, sizeof (cpuid_impl));
func = (CpuidFunc)ptr;
}
>> func (id, p_eax, p_ebx, p_ecx, p_edx);
The mono_global_codeman_reserve returns a bad pointer.
I get the same behavior if i make the following modification to the teste.c
embedded sample:
...
mono_config_parse (NULL);
for(i=0;i<10;i++)
{
domain = mono_jit_init (file);
mono_add_internal_call ("MonoEmbed::gimme", gimme);
main_function (domain, file, argc - 1, argv + 1);
retval = mono_environment_exitcode_get ();
mono_jit_cleanup (domain);
}
return retval;
...
Here i get a crash the second time mono_jit_init is called.
Am i doing something wrong? If not, is there a workaround that i can use?
thanks!
--
View this message in context: http://www.nabble.com/mono_jit_init-and-mono_jit_cleanup-tp23115883p23115883.html
Sent from the Mono - General mailing list archive at Nabble.com.
More information about the Mono-list
mailing list