[crac] RFR: Fix ArchivedEnumTest.java testsuite regression [v3]
Jan Kratochvil
jkratochvil at openjdk.org
Tue Sep 5 08:24:00 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.
Jan Kratochvil has updated the pull request incrementally with one additional commit since the last revision:
Keep GLOBAL_CONTEXT_IMPL_PROP, rename impl_name to implName.
- suggested by Anton Kozlov
-------------
Changes:
- all: https://git.openjdk.org/crac/pull/109/files
- new: https://git.openjdk.org/crac/pull/109/files/41bd6f7d..4c89bcbf
Webrevs:
- full: https://webrevs.openjdk.org/?repo=crac&pr=109&range=02
- incr: https://webrevs.openjdk.org/?repo=crac&pr=109&range=01-02
Stats: 5 lines in 1 file changed: 2 ins; 1 del; 2 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