RFR(M): 8201593: Print array length in ArrayIndexOutOfBoundsException.

Stuart Monteith stuart.monteith at linaro.org
Wed Apr 18 11:12:38 UTC 2018

   On Aarch64 I'm getting the following during jlinking in the build process:

#  Internal Error
pid=27882, tid=27893
#  assert(is_single_cpu() && !is_virtual()) failed: type check
Stack: [0x0000010003de0000,0x0000010003fe0000],
sp=0x0000010003fdcff0,  free space=2035k
Native frames: (J=compiled Java code, A=aot compiled Java code,
j=interpreted, Vv=VM code, C=native code)
V  [libjvm.so+0xf39cd8]  VMError::report_and_die(Thread*, void*, char
const*, int, char const*, char const*, std::__va_list)+0x80
V  [libjvm.so+0x6efbb4]  report_vm_error(char const*, int, char
const*, char const*, ...)+0x14c
V  [libjvm.so+0x43f0d0]  LIR_OprDesc::cpu_regnr() const+0xa8
V  [libjvm.so+0x473120]  LIR_OprDesc::as_register() const+0x14
V  [libjvm.so+0x432ae0]  LIR_OprDesc::as_pointer_register()+0xbc
V  [libjvm.so+0x42ff08]  RangeCheckStub::emit_code(LIR_Assembler*)+0x1ac
V  [libjvm.so+0x4816e4]  LIR_Assembler::emit_stubs(CodeStubList*)+0x100
V  [libjvm.so+0x48172c]  LIR_Assembler::emit_slow_case_stubs()+0x20
V  [libjvm.so+0x434d4c]  Compilation::emit_code_epilog(LIR_Assembler*)+0x3c
V  [libjvm.so+0x4350b0]  Compilation::emit_code_body()+0x140
V  [libjvm.so+0x435388]  Compilation::compile_java_method()+0x254
V  [libjvm.so+0x4356d0]  Compilation::compile_method()+0xd8
V  [libjvm.so+0x435e74]  Compilation::Compilation(AbstractCompiler*,
ciEnv*, ciMethod*, int, BufferBlob*, DirectiveSet*)+0x24c
V  [libjvm.so+0x439cf8]  Compiler::compile_method(ciEnv*, ciMethod*,
int, DirectiveSet*)+0xbc
V  [libjvm.so+0x689be8]
V  [libjvm.so+0x688ce8]  CompileBroker::compiler_thread_loop()+0x2a0
V  [libjvm.so+0xebdd80]  compiler_thread_entry(JavaThread*, Thread*)+0x9c
V  [libjvm.so+0xeb8b7c]  JavaThread::thread_main_inner()+0x1a8
V  [libjvm.so+0xeb89c4]  JavaThread::run()+0x1ac
V  [libjvm.so+0xcf0048]  thread_native_entry(Thread*)+0x17c
C  [libpthread.so.0+0x7e2c]  start_thread+0xb0

The error is specifically C1, C2 and the interpreter are unaffected.

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