-
Bug
-
Resolution: Fixed
-
P4
-
24, 25
-
b04
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8365210 | 25.0.2 | Aleksey Shipilev | P4 | Resolved | Fixed | master |
Noticed that test added by JDK-8328877 is failing with -XX:-CompactStrings:
$ CONF=linux-x86_64-server-fastdebug make images test TEST=runtime/jni/checked/TestLargeUTF8Length.java TEST_VM_OPTS=-XX:-CompactStrings
Exception in thread "main" java.lang.OutOfMemoryError: UTF16 String size is 1073741824, should be less than 1073741823
at java.base/java.lang.StringUTF16.newBytesLength(StringUTF16.java:58)
at java.base/java.lang.StringUTF16.newBytesFor(StringUTF16.java:48)
at java.base/java.lang.StringUTF16.toBytes(StringUTF16.java:167)
at java.base/java.lang.String.<init>(String.java:4848)
at java.base/java.lang.String.<init>(String.java:286)
at TestLargeUTF8Length.test(TestLargeUTF8Length.java:52)
at TestLargeUTF8Length.main(TestLargeUTF8Length.java:58)
It is unclear to me if test even makes sense without compact strings, since it seems to be designed to tickle UTF-8 size boundaries, so we want to create large strings. But it deserves some minor attention, assigning to David.
$ CONF=linux-x86_64-server-fastdebug make images test TEST=runtime/jni/checked/TestLargeUTF8Length.java TEST_VM_OPTS=-XX:-CompactStrings
Exception in thread "main" java.lang.OutOfMemoryError: UTF16 String size is 1073741824, should be less than 1073741823
at java.base/java.lang.StringUTF16.newBytesLength(StringUTF16.java:58)
at java.base/java.lang.StringUTF16.newBytesFor(StringUTF16.java:48)
at java.base/java.lang.StringUTF16.toBytes(StringUTF16.java:167)
at java.base/java.lang.String.<init>(String.java:4848)
at java.base/java.lang.String.<init>(String.java:286)
at TestLargeUTF8Length.test(TestLargeUTF8Length.java:52)
at TestLargeUTF8Length.main(TestLargeUTF8Length.java:58)
It is unclear to me if test even makes sense without compact strings, since it seems to be designed to tickle UTF-8 size boundaries, so we want to create large strings. But it deserves some minor attention, assigning to David.
- backported by
-
JDK-8365210 runtime/jni/checked/TestLargeUTF8Length.java fails with -XX:-CompactStrings
-
- Resolved
-
- caused by
-
JDK-8328877 [JNI] The JNI Specification needs to address the limitations of integer UTF-8 String lengths
-
- Resolved
-
- links to
-
Commit(master) openjdk/jdk25u/999afedf
-
Commit(master) openjdk/jdk/1ca008fd
-
Review(master) openjdk/jdk25u/65
-
Review(master) openjdk/jdk/25970
(1 links to)