RE: Null check elimination & other stuff

"Thong (Tum) Nguyen" <tum-x2aT3/[email protected]>
Newsgroups gmane.comp.gnu.dotgnu.developer
Message-ID <[email protected]>
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....

Regards,

^Tum

> -----Original Message-----
> From: Rhys Weatherley [mailto:[email protected]]
> Sent: Wednesday, 16 June 2004 08:18
> To: [email protected]
> 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
> [email protected]
> http://dotgnu.org/mailman/listinfo/developers
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.