[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [DotGNU]Null check elimination & other stuff

From: Thong (Tum) Nguyen
Subject: RE: [DotGNU]Null check elimination & other stuff
Date: Wed, 16 Jun 2004 08:52:29 +1200

That's what I started investigating.  Unfortunately, I don't have access to
an AIX box to verify that it actually works as intended (might have
permissions to read from 0x0 but not permissions to change its permissions).

The bigger problem (or so I thought) was what would happen if the user
dereferenced a null reference to the last field of a sufficiently large
class.  It looks like CVM generates COP_CKNULL on fields where the offset >
255 so it as long as the first page generates a SEGV (and page_size > 255),
it's perfectly safe.  This is probably something the JITCoder will have to
deal with if it hasn't already....



> -----Original Message-----
> From: Rhys Weatherley [mailto:address@hidden
> Sent: Wednesday, 16 June 2004 08:18
> To: address@hidden
> Subject: Re: [DotGNU]Null check elimination & other stuff
> On Wednesday 16 June 2004 02:30 am, Thong (Tum) Nguyen wrote:
> > Weird.  Is it possible to simply mark the first page as not readable?
> You can probably use mprotect to change the permissions on the zero page.
> Have a look at Kaffe.  I seem to recall that it does this on some
> platforms.
> Anyway, it is OK to do manual null checks on platforms where it is too
> hard to
> do the tricky null checks.
> Cheers,
> Rhys.
> _______________________________________________
> Developers mailing list
> address@hidden

reply via email to

[Prev in Thread] Current Thread [Next in Thread]