use of com.ibm.j9ddr.AddressedCorruptDataException in project openj9 by eclipse.
the class GCHeapLinkedFreeHeader_V1 method getNext.
@Override
public GCHeapLinkedFreeHeader getNext() throws CorruptDataException {
UDATA next = getNextImpl();
if (!next.anyBitsIn(J9Consts.J9_GC_OBJ_HEAP_HOLE_MASK)) {
throw new AddressedCorruptDataException(heapLinkedFreeHeaderPointer.getAddress(), "Next pointer not tagged");
}
next = next.bitAnd(~J9Consts.J9_GC_OBJ_HEAP_HOLE_MASK);
// Presumably code within a version implementation does not need to look up the required version
return new GCHeapLinkedFreeHeader_V1(next);
}
use of com.ibm.j9ddr.AddressedCorruptDataException in project openj9 by eclipse.
the class J9ClassHelper method getArrayName.
public static String getArrayName(J9ClassPointer clazz) throws CorruptDataException {
J9ArrayClassPointer arrayClass = J9ArrayClassPointer.cast(clazz);
StringBuilder name = new StringBuilder();
int arity = 0;
try {
arity = arrayClass.arity().intValue();
} catch (InvalidDataTypeException e) {
throw new AddressedCorruptDataException(arrayClass.getAddress(), "Array arity larger than MAXINT");
}
if (arity > MAXIMUM_ARRAY_ARITY) {
// Doubtful
throw new AddressedCorruptDataException(arrayClass.getAddress(), "Very high arity " + arity + " from array class 0x" + Long.toHexString(arrayClass.getAddress()));
}
for (int i = 0; i < arity; i++) {
name.append('[');
}
String elementClassName = J9ClassHelper.getName(arrayClass.leafComponentType());
Character type = TYPE_MAP.get(elementClassName);
if (type != null) {
name.append(type);
} else {
name.append('L');
name.append(elementClassName);
name.append(";");
}
return name.toString();
}
Aggregations