comparison agent/src/share/classes/sun/jvm/hotspot/oops/InstanceKlass.java @ 12133:6b3ac96bada6

8023477: Invalid CP index when reading ConstantPool. Summary: Need to check for 0 case for InstanceKlass::_generic_signature_index. Reviewed-by: sspitsyn, sla
author jiangli
date Mon, 26 Aug 2013 13:32:14 -0400
parents e22ee8e7ae62
children de6a9e811145
comparison
equal deleted inserted replaced
12109:faf2631b9334 12133:6b3ac96bada6
352 public long getStaticOopFieldCount() { return staticOopFieldCount.getValue(this); } 352 public long getStaticOopFieldCount() { return staticOopFieldCount.getValue(this); }
353 public long getNonstaticOopMapSize() { return nonstaticOopMapSize.getValue(this); } 353 public long getNonstaticOopMapSize() { return nonstaticOopMapSize.getValue(this); }
354 public boolean getIsMarkedDependent() { return isMarkedDependent.getValue(this) != 0; } 354 public boolean getIsMarkedDependent() { return isMarkedDependent.getValue(this) != 0; }
355 public long getVtableLen() { return vtableLen.getValue(this); } 355 public long getVtableLen() { return vtableLen.getValue(this); }
356 public long getItableLen() { return itableLen.getValue(this); } 356 public long getItableLen() { return itableLen.getValue(this); }
357 public Symbol getGenericSignature() { return getConstants().getSymbolAt(genericSignatureIndex.getValue(this)); }
358 public long majorVersion() { return majorVersion.getValue(this); } 357 public long majorVersion() { return majorVersion.getValue(this); }
359 public long minorVersion() { return minorVersion.getValue(this); } 358 public long minorVersion() { return minorVersion.getValue(this); }
359 public Symbol getGenericSignature() {
360 long index = genericSignatureIndex.getValue(this);
361 if (index != 0) {
362 return getConstants().getSymbolAt(index);
363 } else {
364 return null;
365 }
366 }
360 367
361 // "size helper" == instance size in words 368 // "size helper" == instance size in words
362 public long getSizeHelper() { 369 public long getSizeHelper() {
363 int lh = getLayoutHelper(); 370 int lh = getLayoutHelper();
364 if (Assert.ASSERTS_ENABLED) { 371 if (Assert.ASSERTS_ENABLED) {