RFR(M): 8217628: Verbose ArrayIndexOutOfBoundsException message also in JNI

Lindenmaier, Goetz goetz.lindenmaier at sap.com
Mon Jan 28 13:13:05 UTC 2019


Thanks, Lois!

Best regards,
  Goetz.

> -----Original Message-----
> From: Lois Foltan <lois.foltan at oracle.com>
> Sent: Montag, 28. Januar 2019 13:10
> To: Lindenmaier, Goetz <goetz.lindenmaier at sap.com>; David Holmes
> <david.holmes at oracle.com>; hotspot-runtime-dev at openjdk.java.net
> Subject: Re: RFR(M): 8217628: Verbose ArrayIndexOutOfBoundsException
> message also in JNI
> 
> Latest webrev looks good.
> Lois
> 
> On 1/28/2019 5:22 AM, Lindenmaier, Goetz wrote:
> > Hi,
> >
> > Here a new webrev:
> > http://cr.openjdk.java.net/~goetz/wr19/8217628-AIOOBE_msg_jni/03/
> > (David, sorry, I missed the list in my mail Friday...)
> >
> > Messages are capitalized, the method is refactored (definitely better!).
> >
> > Thanks to Martin and Mathias who pointed me to the build error
> > of the  lib on solaris ��
> >
> > This now passed jdk/submit.
> >
> > Best regards,
> >    Goetz.
> >
> >
> >> -----Original Message-----
> >> From: David Holmes <david.holmes at oracle.com>
> >> Sent: Donnerstag, 24. Januar 2019 01:40
> >> To: Lindenmaier, Goetz <goetz.lindenmaier at sap.com>; hotspot-runtime-
> >> dev at openjdk.java.net
> >> Subject: Re: RFR(M): 8217628: Verbose ArrayIndexOutOfBoundsException
> >> message also in JNI
> >>
> >> Hi Goetz,
> >>
> >> On 24/01/2019 12:37 am, Lindenmaier, Goetz wrote:
> >>> Hi
> >>>
> >>> Change JDK-8201593 <https://bugs.openjdk.java.net/browse/JDK-
> 8201593>
> >> : Print array length in ArrayIndexOutOfBoundsException
> >>> introduced text as "Index 13 out of bounds for length 10" to various AIOOB
> >> exceptions
> >>> thrown in the VM. It omitted the exceptions thrown in jni calls.
> >>>
> >>> This change extends the messages to the AIOOB exceptions thrown in
> >>> Get|SetObjectArrayElement and Get|Set<type>ArrayRegion.
> >>>
> >>> Before, Get|SetObjectArrayElement printed just the index,
> >>> Get|Set<type>ArrayRegion printed no message.
> >>>
> >>> Now the following messages are printed:
> >>>     "Index %d out of bounds for length %d"
> >>>     "length %d is negative"
> >>>     "array region %d..%d out of bounds for length %d"
> >>>
> >>> Any advice on capitalizing the first word?  It's already
> >>> handled inconsistently...
> >> I'd suggest capitalizing.
> >>
> >>> Please review:
> >>> http://cr.openjdk.java.net/~goetz/wr19/8217628-AIOOBE_msg_jni/01/
> >> Could I ask that you factor the region check into a small function so we
> >> don't duplicate the logic please. It would take TRAPS and would be
> >> called with a CHECK.
> >>
> >> Thanks,
> >> David
> >> -----
> >>
> >>>
> >>> Best regards,
> >>>
> >>>     Goetz.
> >>>



More information about the hotspot-runtime-dev mailing list