This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: PR libgcj/25265 second part: Throw NoSuchFieldError for missing fields
>>>>> "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.
Tom