RFR: 8287101: CDS should check for file truncation for all regions
Calvin Cheung
ccheung at openjdk.java.net
Thu Jun 2 20:53:56 UTC 2022
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 -XX:+UseSerialGC.
-------------
Commit messages:
- 8287101: CDS should check for file truncation for all regions
Changes: https://git.openjdk.java.net/jdk/pull/9004/files
Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=9004&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8287101
Stats: 46 lines in 3 files changed: 38 ins; 2 del; 6 mod
Patch: https://git.openjdk.java.net/jdk/pull/9004.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/9004/head:pull/9004
PR: https://git.openjdk.java.net/jdk/pull/9004
More information about the hotspot-runtime-dev
mailing list