Mercurial > hg > graal-jvmci-8
diff jvmci/jdk.vm.ci.meta/src/jdk/vm/ci/meta/MemoryAccessProvider.java @ 24113:8cf4cf3f9f2a
missing checks in HotSpotMemoryAccessProviderImpl can cause VM assertions to fail - part 3 (JDK-8177673)
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Sat, 01 Apr 2017 00:28:33 +0200 |
parents | 8abcd8e1285d |
children |
line wrap: on
line diff
--- a/jvmci/jdk.vm.ci.meta/src/jdk/vm/ci/meta/MemoryAccessProvider.java Thu Mar 30 23:54:54 2017 +0200 +++ b/jvmci/jdk.vm.ci.meta/src/jdk/vm/ci/meta/MemoryAccessProvider.java Sat Apr 01 00:28:33 2017 +0200 @@ -35,11 +35,9 @@ * @param displacement the displacement within the object in bytes * @param bits the number of bits to read from memory * @return the read value encapsulated in a {@link JavaConstant} object of {@link JavaKind} kind - * or {@code null} if {@code base} is a boxed object and the read address does not - * denote a location holding an {@code kind} value - * @throws IllegalArgumentException if {@code kind} is {@link JavaKind#Void} or not - * {@linkplain JavaKind#isPrimitive() primitive} kind or {@code bits} is not 8, 16, - * 32 or 64 + * @throws IllegalArgumentException if the read is out of bounds of the object or {@code kind} + * is {@link JavaKind#Void} or not {@linkplain JavaKind#isPrimitive() primitive} + * kind or {@code bits} is not 8, 16, 32 or 64 */ JavaConstant readPrimitiveConstant(JavaKind kind, Constant base, long displacement, int bits) throws IllegalArgumentException; @@ -48,9 +46,9 @@ * * @param base the base address from which the value is read * @param displacement the displacement within the object in bytes - * @return the read value encapsulated in a {@link Constant} object or {@code null} if the - * address computed from {@code base} and {@code displacement} does not denote a - * location holding an {@code Object} value + * @return the read value encapsulated in a {@link Constant} object + * @throws IllegalArgumentException if the address computed from {@code base} and + * {@code displacement} does not denote a location holding an {@code Object} value */ JavaConstant readObjectConstant(Constant base, long displacement); }