Re: RFR: 8321180: Condition for non-latin1 string size too large exception is off by one [v3]

2023-12-09 Thread Raffaello Giulietti
On Fri, 8 Dec 2023 22:35:30 GMT, Roger Riggs wrote: >> In the compact string implementation of non-latin1 (UTF16) strings the >> length is constrained by VM implementation limit on the size a byte array >> that can be allocated. To produce a useful exception the implementation >> checks the st

Re: RFR: 8321180: Condition for non-latin1 string size too large exception is off by one [v3]

2023-12-08 Thread Roger Riggs
> In the compact string implementation of non-latin1 (UTF16) strings the length > is constrained by VM implementation limit on the size a byte array that can > be allocated. To produce a useful exception the implementation checks the > string size against the maximum byte array size. The excepti

Re: RFR: 8321180: Condition for non-latin1 string size too large exception is off by one [v2]

2023-12-08 Thread Raffaello Giulietti
On Fri, 8 Dec 2023 19:50:30 GMT, Roger Riggs wrote: >> In the compact string implementation of non-latin1 (UTF16) strings the >> length is constrained by VM implementation limit on the size a byte array >> that can be allocated. To produce a useful exception the implementation >> checks the st

Re: RFR: 8321180: Condition for non-latin1 string size too large exception is off by one [v2]

2023-12-08 Thread Roger Riggs
On Fri, 8 Dec 2023 19:32:02 GMT, Raffaello Giulietti wrote: >> src/java.base/share/classes/java/lang/StringUTF16.java line 59: >> >>> 57: if (len >= MAX_LENGTH) { >>> 58: throw new OutOfMemoryError("UTF16 String size is " + len + >>> 59:

Re: RFR: 8321180: Condition for non-latin1 string size too large exception is off by one [v2]

2023-12-08 Thread Roger Riggs
> In the compact string implementation of non-latin1 (UTF16) strings the length > is constrained by VM implementation limit on the size a byte array that can > be allocated. To produce a useful exception the implementation checks the > string size against the maximum byte array size. The excepti

Re: RFR: 8321180: Condition for non-latin1 string size too large exception is off by one

2023-12-08 Thread Raffaello Giulietti
On Fri, 8 Dec 2023 16:28:21 GMT, ExE Boss wrote: >> In the compact string implementation of non-latin1 (UTF16) strings the >> length is constrained by VM implementation limit on the size a byte array >> that can be allocated. To produce a useful exception the implementation >> checks the strin

Re: RFR: 8321180: Condition for non-latin1 string size too large exception is off by one

2023-12-08 Thread ExE Boss
On Wed, 6 Dec 2023 23:31:26 GMT, Roger Riggs wrote: > In the compact string implementation of non-latin1 (UTF16) strings the length > is constrained by VM implementation limit on the size a byte array that can > be allocated. To produce a useful exception the implementation checks the > string

RFR: 8321180: Condition for non-latin1 string size too large exception is off by one

2023-12-06 Thread Roger Riggs
In the compact string implementation of non-latin1 (UTF16) strings the length is constrained by VM implementation limit on the size a byte array that can be allocated. To produce a useful exception the implementation checks the string size against the maximum byte array size. The exception messa