This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Null pointer check elimination


>>>>> "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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]