RFR: 8287101: CDS should check for file truncation for all regions
Calvin Cheung
ccheung at openjdk.java.net
Mon Jun 6 21:59:23 UTC 2022
On Thu, 2 Jun 2022 22:36:49 GMT, Ioi Lam <iklam 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.
Thanks @iklam and @coleenp for the review.
-------------
PR: https://git.openjdk.java.net/jdk/pull/9004
More information about the hotspot-runtime-dev
mailing list