[Mono-devel-list] pointer overwritten in mini.c
Zoltan Varga
vargaz at gmail.com
Tue Nov 2 14:56:05 EST 2004
Hi,
I think this is ok to check in.
Zoltan
On Tue, 02 Nov 2004 14:32:55 -0500, Sébastien Pouliot
<spouliot at videotron.ca> wrote:
> Hello,
>
> I was tracking who was allocating MonoJitInfo and found...
>
> if (cfg->method->dynamic)
> jinfo = g_new0 (MonoJitInfo, 1);
> else
> jinfo = mono_mempool_alloc0 (cfg->domain->mp, sizeof (MonoJitInfo));
>
> jinfo = g_new0 (MonoJitInfo, 1);
>
> in mini.c / mini_method_compile.
>
> The last line overwritea the first jinfo pointer (unless I'm missing
> something).
> The first part of the code (if) was changed in mini.c 1.290.
> http://cvs.hispalinux.es/cgi-bin/cvsweb/mono/mono/mini/mini.c?rev=1.289&cont
> ent-type=text/x-cvsweb-markup&cvsroot=mono
>
> Before that the code was:
>
> jinfo = mono_mempool_alloc0 (cfg->domain->mp, sizeof (MonoJitInfo));
> jinfo = g_new0 (MonoJitInfo, 1);
>
> since mini.c 1.1.
> http://cvs.hispalinux.es/cgi-bin/cvsweb/~checkout~/mono/mono/mini/mini.c?rev
> =1.1&content-type=text/plain&cvsroot=mono
>
> Any reasons for that ?
>
> If not can I apply the attached patch ?
>
> The patch doesn't affect
> * corlib unit tests;
> * tests in /mono/tests/ stops at (with or without the patch)
>
> mcs --unsafe -nowarn:0162 -r:TestDriver.dll -out:iface6.exe iface6.cs
> iface6.cs(53) error CS0121: Ambiguous call when selecting function due to
> implicit casts
> iface6.cs(5): 'IA.Add(int)' (name of symbol related to previous error)
> iface6.cs(10): 'IB.Add(int)' (name of symbol related to previous error)
> Compilation failed: 1 error(s), 0 warnings
> make: *** [iface6.exe] Error 1
>
> Sebastien
>
>
>
More information about the Mono-devel-list
mailing list