-
Type:
Bug
-
Resolution: Fixed
-
Priority:
P4
-
Affects Version/s: None
-
Component/s: core-libs
-
b02
| Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
|---|---|---|---|---|---|---|
| JDK-8371563 | 21.0.10 | Goetz Lindenmaier | P4 | Resolved | Fixed | master |
The compact strings implementation of java.lang.String in StringUTF16.newBytesFor checks the length of non-latin1 strings against MAX_LENGTH.
The exception message says "should be less than" is correct but does not match the code.
If the length is exactly MAX_LENGTH the array cannot be allocated, throwing java.lang.OutOfMemoryError: Requested array size exceeds VM limit
The exception message says "should be less than" is correct but does not match the code.
If the length is exactly MAX_LENGTH the array cannot be allocated, throwing java.lang.OutOfMemoryError: Requested array size exceeds VM limit
- backported by
-
JDK-8371563 Condition for non-latin1 string size too large exception is off by one
-
- Resolved
-
- caused by
-
JDK-8311906 Improve robustness of String constructors with mutable array inputs
-
- Closed
-
- causes
-
JDK-8322018 Test java/lang/String/CompactString/MaxSizeUTF16String.java fails with -Xcomp
-
- Resolved
-
- links to
-
Commit
openjdk/jdk/4fb5c128
-
Commit(master)
openjdk/jdk21u-dev/fbc9fad8
-
Review(master)
openjdk/jdk21u-dev/2437
-
Review(master)
openjdk/jdk/17008
(2 links to)