This is the mail archive of the
java-prs@gcc.gnu.org
mailing list for the Java project.
[Bug libgcj/26858] NullPointerException not generated for large classes...
- From: "mckinlay at redhat dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: java-prs at gcc dot gnu dot org
- Date: 27 Mar 2006 18:28:23 -0000
- Subject: [Bug libgcj/26858] NullPointerException not generated for large classes...
- References: <bug-26858-7151@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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).
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26858