Null pointer check elimination

Tom Tromey tromey@redhat.com
Sun Nov 13 06:45:00 GMT 2005


>>>>> "David" == David Daney <ddaney@avtrex.com> writes:

>> It isn't unreasonable to try to detect known good cases during
>> bytecode generation and then write a special method attribute.
>> However, there is a security issue here; I would say we would probably
>> have to ignore this attribute at least in BC mode.

David> I don't see what the security issue is. Don't you trust the compiled
David> version of the class without being able to verify it?
Nope... when compiling BC, we trust the class file only as much as any
JRE would. We verify the code and we generate runtime assertion
tables which, we believe, make the object code typesafe at runtime.
That is, some of the assertions checked by the bytecode verifier are
handled at compile time, and others are deferred to runtime.
Of course, libjava is special; we could probably trust code there
even when compiling BC.
Tom


More information about the Java mailing list

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