RFR(xs): 8196920: VerifierTest_1A.java and VerifierTest_1B.java fail: assert(receiver_klass->is_subtype_of(static_receiver_klass))

Calvin Cheung calvin.cheung at oracle.com
Tue Feb 13 23:23:06 UTC 2018


JBS: https://bugs.openjdk.java.net/browse/JDK-8196920
(sorry, the bug was marked confidential)

webrev: http://cr.openjdk.java.net/~ccheung/8196920/webrev.00/
(the above change was suggested by Ioi)

By design, the test created a unverifiable class:

Expected exception:
java.lang.VerifyError: Call to wrong <init> method
Exception Details:
   Location:
     UnverifiableBase.<clinit>()V @4: invokespecial
   Reason:
     Type 'java/lang/Object' (constant pool 4) is not assignable to 
'VerifierTest0' (constant pool 14)

Due to some recent changes, the test doesn't work with the following vm 
options combination in hs-tier4 testing:
-Xcomp -XX:-TieredCompilation -Xverify:none
and resulting in assert in sharedRuntime.cpp:
assert(receiver_klass->is_subtype_of(static_receiver_klass)) failed: 
actual receiver must be subclass of static receiver klass

A fix is to replace the above with a "bad" method which will never be 
executed during runtime:

Expected exception:
java.lang.VerifyError: Operand stack underflow
Exception Details:
   Location:
     UnverifiableBase.bad()V @0: areturn
   Reason:
     Attempt to pop empty stack.

thanks,
Calvin


More information about the hotspot-runtime-dev mailing list