Latest JDK 8 hotspot-rt sources demonstrates a new issue with the default methods tests and -noverify. This test did not yield the assertion in JDK 8 b117.
% $JAVA_HOME/bin/java -d64 -server vm.runtime.defmeth.AccessibilityFlagsTest -filter testFinalMethodAbstract
AccessibilityFlagsTest {ver=52; flags=0; redefine=false; execMode=}
AccessibilityFlagsTest.testFinalMethodAbstract
DIRECT:
Test1_Class__forName : PASSED
Test1_Class__forName : PASSED
Test1_Class__forName : PASSED
TEST PASSED
% $JAVA_HOME/bin/java -d64 -server -noverify vm.runtime.defmeth.AccessibilityFlagsTest -filter testFinalMethodAbstract
AccessibilityFlagsTest {ver=52; flags=0; redefine=false; execMode=}
AccessibilityFlagsTest.testFinalMethodAbstract
DIRECT:
# To suppress the following error report, specify this argument
# after -XX: or in .hotspotrc: SuppressErrorAt=/klassVtable.cpp:1007
#
# A fatal error has been detected by the Java Runtime Environment:
#
# Internal Error (/java/east/u1/lfoltan/hpot/wrk_hpot-rt/src/share/vm/oops/klassVtable.cpp:1007), pid=14606, tid=140424773265152
# assert(!m->is_final_method()) failed: no final interface methods
#
# JRE version: Java(TM) SE Runtime Environment (8.0-b117) (build 1.8.0-ea-b117)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.0-b61-wrk_hpot-rt_1125_1154-fastdebug mixed mode linux-amd64 compressed oops)
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /java/east/u1/lfoltan/lambda/wrk_defmeth/hs_err_pid14606.log
#
# If you would like to submit a bug report, please visit:
# http://bugreport.sun.com/bugreport/crash.jsp
#
Current thread is 140424773265152
Dumping core ...
Abort (core dumped)
As noted above test yielded expected results with JDK 8 b117 & -noverify:
$JAVA_B117/bin/java -version
java version "1.8.0-ea"
Java(TM) SE Runtime Environment (build 1.8.0-ea-b117)
Java HotSpot(TM) 64-Bit Server VM (build 25.0-b59, mixed mode)
% $JAVA_B117/bin/java -d64 -server -noverify vm.runtime.defmeth.AccessibilityFlagsTest -filter testFinalMethodAbstract
AccessibilityFlagsTest {ver=52; flags=0; redefine=false; execMode=}
AccessibilityFlagsTest.testFinalMethodAbstract
DIRECT:
Test1_Class__forName : FAILED
Expected exception java.lang.ClassFormatError, got: class nsk.share.TestFailure: No exception was thrown
TEST FAILED
% $JAVA_HOME/bin/java -d64 -server vm.runtime.defmeth.AccessibilityFlagsTest -filter testFinalMethodAbstract
AccessibilityFlagsTest {ver=52; flags=0; redefine=false; execMode=}
AccessibilityFlagsTest.testFinalMethodAbstract
DIRECT:
Test1_Class__forName : PASSED
Test1_Class__forName : PASSED
Test1_Class__forName : PASSED
TEST PASSED
% $JAVA_HOME/bin/java -d64 -server -noverify vm.runtime.defmeth.AccessibilityFlagsTest -filter testFinalMethodAbstract
AccessibilityFlagsTest {ver=52; flags=0; redefine=false; execMode=}
AccessibilityFlagsTest.testFinalMethodAbstract
DIRECT:
# To suppress the following error report, specify this argument
# after -XX: or in .hotspotrc: SuppressErrorAt=/klassVtable.cpp:1007
#
# A fatal error has been detected by the Java Runtime Environment:
#
# Internal Error (/java/east/u1/lfoltan/hpot/wrk_hpot-rt/src/share/vm/oops/klassVtable.cpp:1007), pid=14606, tid=140424773265152
# assert(!m->is_final_method()) failed: no final interface methods
#
# JRE version: Java(TM) SE Runtime Environment (8.0-b117) (build 1.8.0-ea-b117)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.0-b61-wrk_hpot-rt_1125_1154-fastdebug mixed mode linux-amd64 compressed oops)
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /java/east/u1/lfoltan/lambda/wrk_defmeth/hs_err_pid14606.log
#
# If you would like to submit a bug report, please visit:
# http://bugreport.sun.com/bugreport/crash.jsp
#
Current thread is 140424773265152
Dumping core ...
Abort (core dumped)
As noted above test yielded expected results with JDK 8 b117 & -noverify:
$JAVA_B117/bin/java -version
java version "1.8.0-ea"
Java(TM) SE Runtime Environment (build 1.8.0-ea-b117)
Java HotSpot(TM) 64-Bit Server VM (build 25.0-b59, mixed mode)
% $JAVA_B117/bin/java -d64 -server -noverify vm.runtime.defmeth.AccessibilityFlagsTest -filter testFinalMethodAbstract
AccessibilityFlagsTest {ver=52; flags=0; redefine=false; execMode=}
AccessibilityFlagsTest.testFinalMethodAbstract
DIRECT:
Test1_Class__forName : FAILED
Expected exception java.lang.ClassFormatError, got: class nsk.share.TestFailure: No exception was thrown
TEST FAILED
- relates to
-
JDK-8029184 Native default Interface method yields assertion with -noverify
-
- Closed
-