[Mono-dev] [PATCH] Unmanaged pointer verification

Rodrigo Kumpera kumpera at gmail.com
Mon Jun 18 17:50:08 EDT 2007


Sure, you're right, but System.IntPtr maps to 'native int', which is a
verifiable type. My issue was with unmanaged pointers.

Rodrigo



On 6/18/07, Kornél Pál <kornelpal at gmail.com> wrote:
>
> Hi,
>
> IntPtr is verifiable so you can store pointers in verifiable code.
>
> Kornél
>
> ----- Original Message -----
> From: "Rodrigo Kumpera" <kumpera at gmail.com>
> To: "Kornél Pál" <kornelpal at gmail.com>
> Cc: "Mono devel list" <mono-devel-list at lists.ximian.com>
> Sent: Monday, June 18, 2007 10:33 PM
> Subject: Re: [Mono-dev] [PATCH] Unmanaged pointer verification
>
>
> Hi Kornél,
>
> My understanding of the spec and what verifiable code is, was that
> verifiable code could take unmanaged pointers and pass then along, only
> dereference, math and taking the address were the forbidden operations.
> But
> if it's common knowledge that verifiable code cannot even touch unmanaged,
> then I'm cool with that :) Thanks for pointing me to this fact.
>
> Cheers,
> Rodrigo
>
>
>
> On 6/18/07, Kornél Pál <kornelpal at gmail.com> wrote:
> >
> > Unmanaged pointers are unverifiable that is documented in the standard.
> >
> > Kornél
> >
> > ----- Original Message -----
> > From: "Rodrigo Kumpera" <kumpera at gmail.com>
> > To: "Mono devel list" <mono-devel-list at lists.ximian.com>
> > Sent: Monday, June 18, 2007 9:43 PM
> > Subject: [Mono-dev] [PATCH] Unmanaged pointer verification
> >
> >
> > > Hi everyone.
> > >
> > > The attached patch makes the verifier perform unmanaged pointer
> > > verification
> > > on local/argument load.
> > > This behavior is not exactly evident by the spec, but testing with the
> > > msft
> > > version, it fails to verify code like:
> > >
> > > .method public static void Foo() cil managed
> > > {
> > >        .maxstack 2
> > >        .locals init (
> > >             int32 * V_0
> > >        )
> > >        ldloc.0
> > >        pop
> > >        ret
> > > }
> > >
> > >
> > > Should I add comments somewhere (code/wiki/?) to hightlight this fact?
> > >
> > > Cheers,
> > > Rodrigo
> > >
> >
> >
> >
> >
> --------------------------------------------------------------------------------
> >
> >
> > > _______________________________________________
> > > 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/20070618/78d89152/attachment.html 


More information about the Mono-devel-list mailing list