[Bug libgcj/26858] NullPointerException not generated for large classes...
ddaney at avtrex dot com
gcc-bugzilla@gcc.gnu.org
Mon Mar 27 18:42:00 GMT 2006
------- Comment #4 from ddaney at avtrex dot com 2006-03-27 18:42 -------
Subject: Re: NullPointerException not generated for large
classes...
mckinlay at redhat dot com wrote:
> ------- Comment #3 from mckinlay at redhat dot com 2006-03-27 18:28 -------
> GCJ could be made to generate explicit null checks when large offsets are used.
> It is probably relatively rare to have a normal object that is larger than a
> page, so performance for most apps shouldn't be effected.
>
> Note that array accesses should not need this as the "length" field will be
> dereferenced first, triggering NullPointerException, assuming bounds checks are
> used. I would also expect Strings should not have a problem.
>
> Do we know who's heap exactly is mapped at such a low address? If its mapped by
> Java/Boehm GC, then we can probably just fix the GC to not map things at such
> low addresses (or to insert guard pages there instead).
It is libgcj's (Boehm GC) heap in my tests that is at 0x1000.
This message:
http://gcc.gnu.org/ml/java/2006-03/msg00206.html
Has more thoughts on the subject.
David Daney.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26858
More information about the Java-prs
mailing list