RFR: JDK-8163808 fix vtable assertion and logging for older classfiles

Karen Kinnear karen.kinnear at oracle.com
Fri Aug 12 15:47:25 UTC 2016


Lois,

Thank you for the review and the question.

The new overriding rules were fixed for JDK-4766230 in JDK7 based on discussions between
Alex Buckley, David Holmes, Vladimir Ivanov and myself. Today we would have modified the specification
to clarify how the fix applies to the different classfile versions - at the time we left the old classfile versions
obeying the previous version of the JVMS. And yes, that was explicitly the overriding rule (JVMS 5.4.5 Overriding) - i.e. does my
class method override an inherited class method - and so it depends on the classfile version of the current
class which we are processing and for whom we are calculating the overriding rules.

The classfile-version specific logic for this was added in 2009. This fix does not change the logic for inheritance
and overriding at all. What it does change is the vtable pre-calculation of expected size for older classfiles to
match the usage logic, so simply an internal inconsistency fix.

thanks,
Karen

> On Aug 12, 2016, at 10:11 AM, Lois Foltan <lois.foltan at oracle.com> wrote:
> 
> Hi Karen,
> 
> Looks good.  For my clarification, it doesn't matter what the version of the supers are?  The transitive over-ride behavior is only governed by the version of the current class whose vtable is being constructed, correct?
> 
> Thanks,
> Lois
> 
> On 8/11/2016 5:07 PM, Karen Kinnear wrote:
>> Please review:
>> https://bugs.openjdk.java.net/browse/JDK-8163808
>> 
>> http://cr.openjdk.java.net/~acorn/8163808.hs/webrev
>> 
>> Bug: For classfiles before class file version 51, JVMS did not support transitive over-ride behavior.
>> Implementation needed to check this in three places, not just one. Vtable size calculation is only exact
>> for later classfile versions.
>> 
>> Also fixed vtable logging output - since the method name-and-sig printing was changed to also print
>> the holder’s class name, we do not need to print the holder’s class name separately - it was printing twice.
>> 
>> Testing: linux-x64-slowdebug
>> rbt hs-nightly-runtime.js
>> jck vm,lang, api.java.lang
>> small invocation tests
>> 
>> thanks,
>> Karen
> 



More information about the hotspot-runtime-dev mailing list