-
Enhancement
-
Resolution: Fixed
-
P4
-
8
-
b01
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8359943 | shenandoah8u392 | Zdenek Zambersky | P4 | Resolved | Fixed | b01 |
java_lang_String::hash_code produces inconsistent results on different platforms, when s is char*. This is because on some platforms char is signed, while on others unsigned (resulting in char to be either zero-extended or sign-extended, when cast to unsigned int). This causes 1 tier1 test failure on aarch64.
Details:
This was discovered by examining one failing test (from tier1) present on aarch64 builds:
test/serviceability/sa/jmap-hashcode/Test8028623.java
Test was introduced byJDK-8028623. However fix done there does not work on aarch64. Code was later fixed (newer jdks) in hotspot part of JDK-8141132 (JEP 254: Compact Strings).
Fix:
Fixed by backporting very small portion ofJDK-8141132.
Testing:
tier1 (x86, x86_64, aarch64): OK (tested by GH and on aarch64 machine)
Details:
This was discovered by examining one failing test (from tier1) present on aarch64 builds:
test/serviceability/sa/jmap-hashcode/Test8028623.java
Test was introduced by
Fix:
Fixed by backporting very small portion of
Testing:
tier1 (x86, x86_64, aarch64): OK (tested by GH and on aarch64 machine)
- backported by
-
JDK-8359943 [8u] make java_lang_String::hash_code consistent across platforms
-
- Resolved
-