# HG changeset patch # User Christos Kotselidis # Date 1373878090 -7200 # Node ID 45dc193567c2ef66dd904dcd60e60d893861ba37 # Parent bdd7c8e2293e6fe7d268980b00f4439c60a45bcb Add assertions diff -r bdd7c8e2293e -r 45dc193567c2 graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotRuntime.java --- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotRuntime.java Fri Jul 12 23:26:01 2013 +0200 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotRuntime.java Mon Jul 15 10:48:10 2013 +0200 @@ -1168,7 +1168,11 @@ return Constant.forInt(base == null ? unsafe.getInt(displacement) : unsafe.getInt(base, displacement)); case Long: if (displacement == config().hubOffset && this.getGraalRuntime().getRuntime().config.useCompressedKlassPointers) { - return Constant.forLong(this.getGraalRuntime().getCompilerToVM().readUnsafeKlassPointer(base)); + if (base == null) { + throw new GraalInternalError("Base of object must not be null"); + } else { + return Constant.forLong(this.getGraalRuntime().getCompilerToVM().readUnsafeKlassPointer(base)); + } } else { return Constant.forLong(base == null ? unsafe.getLong(displacement) : unsafe.getLong(base, displacement)); }