RFR: 8287101: CDS should check for file truncation for all regions
Ioi Lam
iklam at openjdk.java.net
Thu Jun 2 22:40:31 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.
Looks good.
-------------
Marked as reviewed by iklam (Reviewer).
PR: https://git.openjdk.java.net/jdk/pull/9004
More information about the hotspot-runtime-dev
mailing list