Integrated: 8287101: CDS should check for file truncation for all regions
Calvin Cheung
ccheung at openjdk.java.net
Mon Jun 6 21:59:25 UTC 2022
On Thu, 2 Jun 2022 20:41:15 GMT, Calvin Cheung <ccheung at openjdk.org> wrote:
> Currently, only the `last_valid_region` is checked for file truncation for a CDS archive. If serial GC is used, file truncation is not detected because the `last_valid_region` is empty so `si->file_offset() == 0`. This change is for checking file truncation for all regions.
>
> Also add a test which truncates at the end of the file to trigger the "The shared archive file has been truncated." error.
>
> Testing: tiers 1 and 2, also ran the test case with -XX:+UseSerialGC.
This pull request has now been integrated.
Changeset: 124ba45f
Author: Calvin Cheung <ccheung at openjdk.org>
URL: https://git.openjdk.java.net/jdk/commit/124ba45fb83985676136ecb3c55a781382fdbfd7
Stats: 46 lines in 3 files changed: 38 ins; 2 del; 6 mod
8287101: CDS should check for file truncation for all regions
Reviewed-by: iklam, coleenp
-------------
PR: https://git.openjdk.java.net/jdk/pull/9004
More information about the hotspot-runtime-dev
mailing list