RFR (XS) 8076236: VM permits illegal flags for class init method
David Holmes
david.holmes at oracle.com
Sat Apr 4 03:27:35 UTC 2015
On 3/04/2015 10:15 PM, harold seigel wrote:
> Hi David,
>
> Thanks for your comments. I don't intend to backport this fix but this
> fix will affect old byte codes when they are run with JDK-9. Hopefully,
> this won't affect too many programs.
>
> I guess there's always a trade-off between spec-affinity, compatibility,
> (and security). See https://bugs.openjdk.java.net/browse/JDK-8076338
> for example.
Yep sometimes we have to constrain compliance fixes so that they only
impact new classes going forward (and sometimes we just relax the spec).
In this current case for example it may have been prudent to only fix
the access check in the JDK 9 class file version (I forget what number
we are up to - 52?), so that existing old code doesn't suddenly break.
Time will tell if we need to make that change.
Cheers,
David
> Thanks, Harold
>
> On 4/2/2015 9:12 PM, David Holmes wrote:
>> Hi Harold,
>>
>> Seems like a reasonable fix to become compliant with the spec, but it
>> is technically a compatability issue. There may be generated bytecode
>> out there from tools that didn't do the right thing with access
>> modifiers and it will now be rejected. Possibly okay for 9 but I
>> wouldn't backport this.
>>
>> David
>>
>> On 1/04/2015 10:11 PM, harold seigel wrote:
>>> Hi,
>>>
>>> Please review this small fix for JDK-8076236. The fix moves the check
>>> for multiple access flags so that it covers all methods in a class
>>> including instance initialization methods.
>>>
>>> Open webrev: http://cr.openjdk.java.net/~hseigel/bug_8076236/
>>>
>>> JBS Bug: https://bugs.openjdk.java.net/browse/JDK-8076236
>>>
>>> The fix was tested with the JCK lang, vm, and api tests, hotspot jtreg
>>> tests, testbase split_verifier and quick tests, and the test cases
>>> provided in the bug. No new tests are included with this fix because
>>> new JCK tests will test this.
>>>
>>> Thanks, Harold
>
More information about the hotspot-runtime-dev
mailing list