Integrated: 8287869: -XX:+AutoCreateSharedArchive doesn't work when JDK build is switched
Ioi Lam
iklam at openjdk.java.net
Tue Jun 7 23:15:32 UTC 2022
On Mon, 6 Jun 2022 22:30:13 GMT, Ioi Lam <iklam at openjdk.org> wrote:
> When you switch to a different build of the JDK (to a different version, or from product to debug), `-XX:+AutoCreateSharedArchive` should automatically regenerate the dynamic CDS archive.
>
> However, we have a bug where the information about the base archive is incorrectly stored in the dynamic archive. As a result, the new JDK will try to load the default base archive from the old JDK, causing CDS to be disabled, which means that the dynamic CDS archive cannot be generated at VM exit.
>
> The fix is to correctly set `GenericCDSFileMapHeader::__base_archive_name_{offset,size}` to zero when the default base archive is used.
>
> (Currently the fix can be validated only manually -- see JBS bug report. We are looking into a way to test this scenario automatically in the CI).
This pull request has now been integrated.
Changeset: 68c5957b
Author: Ioi Lam <iklam at openjdk.org>
URL: https://git.openjdk.java.net/jdk/commit/68c5957b9e2306d96bec2d655ec743f13f250dae
Stats: 27 lines in 4 files changed: 12 ins; 0 del; 15 mod
8287869: -XX:+AutoCreateSharedArchive doesn't work when JDK build is switched
Reviewed-by: ccheung, dholmes
-------------
PR: https://git.openjdk.java.net/jdk/pull/9046
More information about the hotspot-runtime-dev
mailing list