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

Coleen Phillimore coleen.phillimore at oracle.com
Fri Aug 12 14:47:51 UTC 2016


  void vtableEntry::verify(klassVtable* vt, outputStream* st) {
    NOT_PRODUCT(FlagSetting fs(IgnoreLockingAssertions, true));
+ KlassHandle vtklass_h = vt->klass();
+ Klass* vtklass = vtklass_h();
+ if (InstanceKlass::cast(vtklass)->major_version() >= 
    assert(method() != NULL, "must have set method");
+ }

I might be wrong but the vtable->klass() can be an ArrayKlass, so I 
think you have to do:

if (vtklass->oop_is_instance() && InstanceKlass::cast(vtklass) ...)

InstanceKlass::cast makes this assertion.  Otherwise, the code looks good.


On 8/11/16 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