[crac] RFR: Fix ArchivedEnumTest.java testsuite regression
Jan Kratochvil
jkratochvil at openjdk.org
Sun Sep 3 14:49:20 UTC 2023
java.lang.RuntimeException: 'object points to a static field that may be reinitialized at runtime' found in stdout
at jdk.test.lib.process.OutputAnalyzer.shouldNotContain(OutputAnalyzer.java:267)
at ArchivedEnumTest.main(ArchivedEnumTest.java:49)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:333)
at java.base/java.lang.Thread.run(Thread.java:1570)
[1.337s][warning][cds,heap] Archive heap points to a static field that may be reinitialized at runtime:
[1.337s][warning][cds,heap] Field: jdk/crac/impl/GlobalContext::GLOBAL_CONTEXT_IMPL_NAME
[1.337s][warning][cds,heap] Value: java.lang.String
[1.337s][warning][cds,heap] {0x00000000d7561560} - klass: 'java/lang/String'
[1.337s][warning][cds,heap] - string: ""
[1.337s][warning][cds,heap] - ---- fields (total size 3 words):
[1.337s][warning][cds,heap] - private 'hash' 'I' @12 0 (0x00000000)
[1.337s][warning][cds,heap] - private final 'coder' 'B' @16 0 (0x00)
[1.338s][warning][cds,heap] - private 'hashIsZero' 'Z' @17 true (0x01)
[1.338s][warning][cds,heap] - injected 'flags' 'B' @18 1 (0x01)
[1.338s][warning][cds,heap] - private final 'value' '[B' @20 [B{0x00000000d7561578} (0xd7561578)
[1.338s][warning][cds,heap] --- trace begin ---
[1.338s][warning][cds,heap] [ 0] (shared string table)
[1.338s][warning][cds,heap] [ 1] {0x00000000d7561560} java.lang.String
[1.338s][warning][cds,heap] --- trace end ---
I haven't found a way how to fix [src/java.base/share/classes/jdk/crac/impl/GlobalContext.java](https://github.com/openjdk/crac/blob/crac/src/java.base/share/classes/jdk/crac/impl/GlobalContext.java) not regressing its current static field performance without adding this exception.
-------------
Commit messages:
- Fix ArchivedEnumTest.java testsuite regression
Changes: https://git.openjdk.org/crac/pull/109/files
Webrev: https://webrevs.openjdk.org/?repo=crac&pr=109&range=00
Stats: 5 lines in 2 files changed: 1 ins; 0 del; 4 mod
Patch: https://git.openjdk.org/crac/pull/109.diff
Fetch: git fetch https://git.openjdk.org/crac.git pull/109/head:pull/109
PR: https://git.openjdk.org/crac/pull/109
More information about the crac-dev
mailing list