# HG changeset patch # User Gilles Duboscq # Date 1398151797 -7200 # Node ID cf6aedb39215da7abd9d78e259839f2b14ae69a1 # Parent a83af341392726f8bb74655c417f8554ce92dbb6 Prevent using loadReferencedType with LDC when the constant pool index refers to InvokeDynamic entry but isn't an invokedynamic index. diff -r a83af3413927 -r cf6aedb39215 graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotConstantPool.java --- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotConstantPool.java Tue Apr 22 00:52:56 2014 +0100 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotConstantPool.java Tue Apr 22 09:29:57 2014 +0200 @@ -529,6 +529,9 @@ } break; case InvokeDynamic: + if (!isInvokedynamicIndex(cpi)) { + throw new IllegalArgumentException("InvokeDynamic entries must be accessed"); + } runtime().getCompilerToVM().resolveInvokeDynamic(metaspaceConstantPool, cpi); break; default: