8000623: tools/javac/Diagnostics/6769027/T6769027.java crashes in PSPromotionManager::copy_to_survivor_space
authorkvn
Wed, 17 Oct 2012 12:09:32 -0700
changeset 14126 afb8a3a86f1f
parent 14072 11606bd0741b
child 14127 16ba0a8dfde2
8000623: tools/javac/Diagnostics/6769027/T6769027.java crashes in PSPromotionManager::copy_to_survivor_space Summary: Fix type of method pointer load from vtable. Reviewed-by: twisti, johnc, roland
hotspot/src/share/vm/opto/compile.cpp
hotspot/src/share/vm/opto/compile.hpp
hotspot/src/share/vm/opto/library_call.cpp
--- a/hotspot/src/share/vm/opto/compile.cpp	Fri Oct 12 14:06:27 2012 -0700
+++ b/hotspot/src/share/vm/opto/compile.cpp	Wed Oct 17 12:09:32 2012 -0700
@@ -3047,9 +3047,9 @@
   case T_LONG:
   case T_DOUBLE:  return (_v._value.j == other._v._value.j);
   case T_OBJECT:
-  case T_METADATA: return (_v._metadata == other._v._metadata);
   case T_ADDRESS: return (_v._value.l == other._v._value.l);
   case T_VOID:    return (_v._value.l == other._v._value.l);  // jump-table entries
+  case T_METADATA: return (_v._metadata == other._v._metadata);
   default: ShouldNotReachHere();
   }
   return false;
--- a/hotspot/src/share/vm/opto/compile.hpp	Fri Oct 12 14:06:27 2012 -0700
+++ b/hotspot/src/share/vm/opto/compile.hpp	Wed Oct 17 12:09:32 2012 -0700
@@ -149,7 +149,7 @@
   private:
     BasicType _type;
     union {
-    jvalue    _value;
+      jvalue    _value;
       Metadata* _metadata;
     } _v;
     int       _offset;         // offset of this constant (in bytes) relative to the constant table base.
--- a/hotspot/src/share/vm/opto/library_call.cpp	Fri Oct 12 14:06:27 2012 -0700
+++ b/hotspot/src/share/vm/opto/library_call.cpp	Wed Oct 17 12:09:32 2012 -0700
@@ -3830,7 +3830,7 @@
                      vtable_index*vtableEntry::size()) * wordSize +
                      vtableEntry::method_offset_in_bytes();
   Node* entry_addr  = basic_plus_adr(obj_klass, entry_offset);
-  Node* target_call = make_load(NULL, entry_addr, TypeInstPtr::NOTNULL, T_OBJECT);
+  Node* target_call = make_load(NULL, entry_addr, TypePtr::NOTNULL, T_ADDRESS);
 
   // Compare the target method with the expected method (e.g., Object.hashCode).
   const TypePtr* native_call_addr = TypeMetadataPtr::make(method);