8187078: -XX:+VerifyOops finds numerous problems when running JPRT jdk-12+10
authordlong
Wed, 05 Sep 2018 13:10:40 -0700
changeset 51649 8f594f75e054
parent 51648 b7b69bc93a2d
child 51650 35dee171e59c
8187078: -XX:+VerifyOops finds numerous problems when running JPRT Reviewed-by: kvn
src/hotspot/share/c1/c1_LIRGenerator.cpp
src/hotspot/share/gc/shared/c1/barrierSetC1.cpp
src/hotspot/share/runtime/java.cpp
--- a/src/hotspot/share/c1/c1_LIRGenerator.cpp	Wed Sep 05 10:39:16 2018 -0700
+++ b/src/hotspot/share/c1/c1_LIRGenerator.cpp	Wed Sep 05 13:10:40 2018 -0700
@@ -3218,7 +3218,7 @@
 void LIRGenerator::do_ProfileCall(ProfileCall* x) {
   // Need recv in a temporary register so it interferes with the other temporaries
   LIR_Opr recv = LIR_OprFact::illegalOpr;
-  LIR_Opr mdo = new_register(T_OBJECT);
+  LIR_Opr mdo = new_register(T_METADATA);
   // tmp is used to hold the counters on SPARC
   LIR_Opr tmp = new_pointer_register();
 
--- a/src/hotspot/share/gc/shared/c1/barrierSetC1.cpp	Wed Sep 05 10:39:16 2018 -0700
+++ b/src/hotspot/share/gc/shared/c1/barrierSetC1.cpp	Wed Sep 05 13:10:40 2018 -0700
@@ -321,7 +321,7 @@
       __ cmp(lir_cond_equal, base.result(), LIR_OprFact::oopConst(NULL));
       __ branch(lir_cond_equal, T_OBJECT, cont->label());
     }
-    LIR_Opr src_klass = gen->new_register(T_OBJECT);
+    LIR_Opr src_klass = gen->new_register(T_METADATA);
     if (gen_type_check) {
       // We have determined that offset == referent_offset && src != null.
       // if (src->_klass->_reference_type == REF_NONE) -> continue
--- a/src/hotspot/share/runtime/java.cpp	Wed Sep 05 10:39:16 2018 -0700
+++ b/src/hotspot/share/runtime/java.cpp	Wed Sep 05 13:10:40 2018 -0700
@@ -333,7 +333,7 @@
     klassVtable::print_statistics();
     klassItable::print_statistics();
   }
-  if (VerifyOops) {
+  if (VerifyOops && Verbose) {
     tty->print_cr("+VerifyOops count: %d", StubRoutines::verify_oop_count());
   }