Comments (4)
jdk8, jdk11 and jdk21 give the expected result.
@tajila fyi
from openj9.
@theresa-m Please take a look at this.
from openj9.
In OpenJ9 Java 11/17/21 all use different variations of the java.lang.String library.
- 11 uses the custom String library in OpenJ9 https://github.com/eclipse-openj9/openj9/blob/master/jcl/src/java.base/share/classes/java/lang/String.java
- 17 uses the String library from OpenJDK with modifications https://github.com/ibmruntimes/openj9-openjdk-jdk17/blob/openj9/src/java.base/share/classes/java/lang/String.java
- 21 also uses the modified OpenJDK String library but does not experience this problem because
StringBuilder.toString
goes through a different String constructor
The error in 17 is caused due to a missing call to initCompressionFlag();
when the string is created through StringBuilder. When String.hashCode
is called the uninitialized compression flag causes hashCodeImplCompressed
to be called instead of hashCodeImplDecompressed
.
initCompressionFlag();
should be called in this String constructor https://github.com/ibmruntimes/openj9-openjdk-jdk17/blob/openj9/src/java.base/share/classes/java/lang/String.java#L5309-L5312
I will also apply the change to 21 and 22 once 17 is approved because even though its not seeing this failure it is possible that it could occur from other calls to this constructor.
from openj9.
Java 17 ibmruntimes/openj9-openjdk-jdk17#335
Java 21 ibmruntimes/openj9-openjdk-jdk21#138
Java 22 ibmruntimes/openj9-openjdk-jdk22#37
Java next ibmruntimes/openj9-openjdk-jdk#766
from openj9.
Related Issues (20)
- jdk23 OpenJDK String/CompactString/MaxSizeUTF16String Expected java.lang.OutOfMemoryError to be thrown, but nothing was thrown
- ReentrantLockTest::testAwaitUninterruptibly_fair timed out waiting for thread to enter thread state WAITING HOT 1
- Using full command line as GC hints key causes key proliferation HOT 11
- OpenJDK CompactString/MaxSizeUTF16String testMaxCharArray() expects OOM but gets NegativeArraySizeException with JIT HOT 8
- FIPS cmdLineTester_criu_nonPortableRestore_1_FAILED testSystemNanoTimeJitPreCheckpointCompile
- testOpenJ9DiagnosticsMXBean testRemote_resetDumpOptions UndeclaredThrowableException
- jcmd and late attach don't work with java under Windows Services HOT 6
- Storing all classes to SCC for startup performance HOT 7
- testJITServerArguments_0 failure on ppc64le: crash during initial SSL connection HOT 24
- Incorrect default cache directory permission on z/OS Java 11+
- DaaLoadTest_daa3 crash vmState=0x000522ff HOT 7
- JDK23 recipe for target 'jdk.management-copy' failed HOT 2
- OpenJ9-JDK17 mockito test failed on s390x_zos platform HOT 1
- jdk_vector_0_FAILED jdk/incubator/vector/Float64VectorTests.java NullPointerException: Cannot throw exception
- IndexOf method of String file fails using Eclipse OpenJ9 VM 11.0.22.0 HOT 9
- MessageDigest/TestDigestIOStream ArrayIndexOutOfBoundsException HOT 1
- JVM_LoadLibrary should handle .a files on AIX HOT 14
- CryptoTests are reporting GssApiMechanismTests and SaslServerFactoryTests as passed, where it should be skipped HOT 1
- harmony crash newObjectArray vmState=0x00040000
- MockitoMockTest doesn't run on jdk23 yet - Java 23 (67) is not supported by the current version of Byte Buddy HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from openj9.