RFR(M): 8201593: Print array length in ArrayIndexOutOfBoundsException.
Stuart Monteith
stuart.monteith at linaro.org
Thu Apr 19 12:25:40 UTC 2018
Hello Goetz,
In c1_CodeStubs_aarch64.cpp, RangeCheckStub::emit_code you just
need to guard the emission of rscratch2 - you don't use it in one of
the cases, something like:
if (!_throw_index_out_of_bounds_exception) {
__ mov(rscratch2, _array->as_pointer_register());
}
Once I can run the unit tests, I'm seeing failures in your unit test like:
java.lang.AssertionError: expected [trying to access index -5 of an
array with length 0] but found [trying to access index -5 of an array
with length -1459548190]
BR,
Stuart
On 18 April 2018 at 09:09, Lindenmaier, Goetz <goetz.lindenmaier at sap.com> wrote:
> Hi,
>
> I would like to print a more verbose text on ArrayIndexOutOfBounds exception
> that not only mentions the index, but also the length of the array accessed.
> See the bug for documentation of the change of the message.
> http://cr.openjdk.java.net/~goetz/wr18/8201593-lenInAIOOB/01/
>
> @aarch/arm people:
> I edited the aarch/arm files. Could you please verify this is correct?
> I can not build on these platforms.
>
> The code on all the other platforms is tested with all the jtreg and jck tests etc.
>
> Best regards,
> Goetz.
>
>
More information about the hotspot-compiler-dev
mailing list