Always enforce ACC_SUPER

Rémi Forax forax at univ-mlv.fr
Fri May 18 06:51:20 PDT 2012


I don't think you can change this without changing the JVM spec,
because the behavior of a class without ACC_SUPER is clearly defined.

Rémi

On 05/18/2012 03:32 PM, Florian Weimer wrote:
> On 05/18/2012 02:44 PM, Keith McGuigan wrote:
>> I haven't investigated (maybe you have), but does the JVMS allow this
>> sort of behavior?
>
> I'm not sure.  It probably doesn't.  This part of the JVMS is for 
> compatibility with pre-1.0.2 implementations, and 1.0.2 was the first 
> publicly released version.  So I hope that this deviation is acceptable.
>
>> If it does (and if it doesn't, then that's the place
>> to start), might it make sense to limit setting this flag implicitly to
>> newer versions of classfiles (say >=51), or only to classes which have
>> an ACC_SUPER set in their set of non-Object superclasses, or something
>> like that? Seems like we should have something in place to mitigate any
>> backward-compatibility concerns in order to go forward with this.
>
> Unfortunately, we have to make this change in a way such that classes 
> can't opt out of it.  Otherwise, it will not have any affect.
>



More information about the hotspot-dev mailing list