This is the mail archive of the java-patches@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: PR libgcj/25265 second part: Throw NoSuchFieldError for missing fields


Tom Tromey writes:
 > >>>>> "Andrew" == Andrew Haley <aph@redhat.com> writes:
 > 
 > Andrew> That's a really good point!  Maybe with a bit of thought the runtime
 > Andrew> test could be removed for that first case, because the inner class
 > Andrew> will be compiled and resolved with its enclosing class, so accesses to
 > Andrew> outer fields should always be OK.  That's perhaps worth doing.
 > 
 > I think the case to worry about is when an attacker modifies an outer
 > class but leaves the inner class the same.  In this situation the
 > compiled inner class could read/write non-existent fields.

Mmm, yes.  But I was planning to do this short-cut only in the case
where we were compiling inner and outer in the same compilation unit.

Andrew.


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