RFR: 8342089: Require --enable-native-access to be the same between CDS dump time and run time [v3]
Calvin Cheung
ccheung at openjdk.org
Fri Nov 22 20:00:17 UTC 2024
On Fri, 22 Nov 2024 18:36:35 GMT, Matias Saavedra Silva <matsaave at openjdk.org> wrote:
>> Applications that use JNI or FFM need to use the `--enable-native-access` flag, or include the Enable-Native-Access attribute in their JAR files. Currently, the CDS archive cannot use optimized module handling when `--enable-native-access` is specified, so such applications do not support CDS.
>>
>> This patch no longer disables optimized module graph so long as the `--enable-native-access` is consistent between dump time and runtime. The modules list provided by the option is stored in the RO region of the CDS archive. Verified with tier 1-5 tests and a new regression test.
>
> Matias Saavedra Silva has updated the pull request incrementally with one additional commit since the last revision:
>
> Fixed copyright
Looks good overall. I have a few comments.
src/hotspot/share/classfile/modules.cpp line 698:
> 696: st.print("%s%s", prefix, m);
> 697: last_string = m;
> 698: prefix = ",";
Why did you change this back to ","?
test/hotspot/jtreg/runtime/cds/appcds/jigsaw/module/EnableNativeAccessCDS.java line 69:
> 67: oa.shouldHaveExitValue(0)
> 68: .shouldContain("Mismatched modules for jdk.module.enable.native.access")
> 69: .shouldContain(disabledOptimizedModule);
Please align the '.'
(Similar alignment issue below)
At line #68, can you check the entire message, e.g.
"Mismatched modules for jdk.module.enable.native.access: runtime java.base dump time jdk.httpserver"?
test/hotspot/jtreg/runtime/cds/appcds/jigsaw/module/EnableNativeAccessCDS.java line 130:
> 128: "-version");
> 129: oa.shouldHaveExitValue(0)
> 130: .shouldContain("Mismatched modules for jdk.module.enable.native.access")
Can you check the entire message?
-------------
PR Review: https://git.openjdk.org/jdk/pull/22305#pullrequestreview-2455515998
PR Review Comment: https://git.openjdk.org/jdk/pull/22305#discussion_r1854572928
PR Review Comment: https://git.openjdk.org/jdk/pull/22305#discussion_r1854574701
PR Review Comment: https://git.openjdk.org/jdk/pull/22305#discussion_r1854578211
More information about the hotspot-runtime-dev
mailing list