8264413: Data is written to file header even if its CRC32 was calculated #3261
Many tests under
$ diff dump.log run.log 17c17 < - base_archive_is_default: 0 --- > - base_archive_is_default: 1 19c19 < - base_archive_name_size: 0 --- > - base_archive_name_size: 113
The root cause is that even if the CRC32 is calculated(Line 1902), ArchiveBuilder is still writing data to FileMapInfo(Line 1903):
Now the expected CRC32(serialized in CDS archive) is different from the calculated ones at runtime. This patch addresses this problem, it writes base_archive_name and size into header before calculating CRC32(if needed).
calvinccheung left a comment
@kelthuzadx This change now passes all automated pre-integration checks.
After integration, the commit message for the final commit will be:
At the time when this comment was updated there had been 35 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.
As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@calvinccheung, @yminqi) but any other Committer may sponsor as well.
Besides, I've added a new dynamic cds test with -XX:+VerifySharedSpaces.
Your commit was automatically rebased without conflicts.
Pushed as commit de495df.