Mercurial > hg > truffle
changeset 15255:cf6aedb39215
Prevent using loadReferencedType with LDC when the constant pool index refers to InvokeDynamic entry but isn't an invokedynamic index.
author | Gilles Duboscq <duboscq@ssw.jku.at> |
---|---|
date | Tue, 22 Apr 2014 09:29:57 +0200 |
parents | a83af3413927 |
children | 7a0e339e0b56 |
files | graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotConstantPool.java |
diffstat | 1 files changed, 3 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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: