Libjava failures status

Andrew Haley aph@cambridge.redhat.com
Tue Mar 12 05:53:00 GMT 2002


Jan Hubicka writes:
 > > Jan Hubicka wrote:
 > > 
 > > >>It would be nice if we could avoid pessimising this too much. eg given:
 > > >>
 > > >>a = foo.a;
 > > >>b = foo.b;
 > > >>
 > > >>Then obviously the second load from foo can not trap. I assume that 
 > > >>would allow for larger BBs and that is good for optimization.
 > > >>
 > > >
 > > >Concerning the memory traps, Java has references and bounding checks on 
 > > >arrays.
 > > >How can one even access trapping memory in Java?
 > > >
 > > 
 > > "foo" could be a null pointer: NullPointerException.
 > Aha. But then Java should probably generate checks, as foo.b may
 > not trap in case foo is large enought and NULL pointer area small
 > enought.
There is a compiler option to enable such checks.
But how big can foo be? There may only be 64k fields in an object[*],
and each field is a scalar. To subvert this protatection you'd need a
machine that did not trap on memory accesses below 1 megabyte.
 > So basically we are relying on the NULL pointer references to trap and
 > other references may not trap?
Yes.
Andrew.
[*] JVM spec.


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /