changeset 1576:4a2e260bb13a

6957882: nsk/sajdi tests failed with NullPointerException Summary: VM.getObjectAlignmentInBytes() accesses intxType before it is created. Reviewed-by: never
author kvn
date Wed, 02 Jun 2010 12:02:49 -0700
parents 3657cb01ffc5
children 852d0157c696
files agent/src/share/classes/sun/jvm/hotspot/runtime/VM.java
diffstat 1 files changed, 7 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/agent/src/share/classes/sun/jvm/hotspot/runtime/VM.java	Wed Jun 02 09:49:32 2010 -0700
+++ b/agent/src/share/classes/sun/jvm/hotspot/runtime/VM.java	Wed Jun 02 12:02:49 2010 -0700
@@ -314,6 +314,13 @@
       isLP64 = debugger.getMachineDescription().isLP64();
     }
     bytesPerLong = db.lookupIntConstant("BytesPerLong").intValue();
+    heapWordSize = db.lookupIntConstant("HeapWordSize").intValue();
+    oopSize  = db.lookupIntConstant("oopSize").intValue();
+
+    intxType = db.lookupType("intx");
+    uintxType = db.lookupType("uintx");
+    boolType = (CIntegerType) db.lookupType("bool");
+
     minObjAlignmentInBytes = getObjectAlignmentInBytes();
     if (minObjAlignmentInBytes == 8) {
       logMinObjAlignmentInBytes = 3;
@@ -323,13 +330,6 @@
       throw new RuntimeException("Object alignment " + minObjAlignmentInBytes + " not yet supported");
     }
 
-    heapWordSize = db.lookupIntConstant("HeapWordSize").intValue();
-    oopSize  = db.lookupIntConstant("oopSize").intValue();
-
-    intxType = db.lookupType("intx");
-    uintxType = db.lookupType("uintx");
-    boolType = (CIntegerType) db.lookupType("bool");
-
     if (isCompressedOopsEnabled()) {
       // Size info for oops within java objects is fixed
       heapOopSize = (int)getIntSize();