[11u] RFR: 8226406: JVM fails to detect mismatched or corrupt CDS archive
Jiangli Zhou
jianglizhou at google.com
Tue Jan 28 23:20:21 UTC 2020
Hi Goetz,
The backport and modifications in filemap.cpp look good. Would it be
good to also add a comment noting the code below is backported from
JDK 13 and not compatible/needed for 11?
527 //if (_header->_header_size != sz) {
528 // log_info(cds)("_header_size expected: " SIZE_FORMAT, sz);
529 // log_info(cds)(" actual: " SIZE_FORMAT,
_header->_header_size);
530 // FileMapInfo::fail_continue("The shared archive file has an
incorrect header size.");
531 // return false;
532 // }
I'll also run some tests on my side with your patch applied.
Best regards,
Jiangli
On Tue, Jan 28, 2020 at 7:07 AM Lindenmaier, Goetz
<goetz.lindenmaier at sap.com> wrote:
>
> Hi
>
> I would like to downport gthis change for parity with 11.0.7-oracle.
>
> I had to do several adaptions of the change to get the code into 11u.
>
> In filemap.cpp jdk13 distinguishes CDS_ARCHIVE_MAGIC and CDS_DYNAMIC_ARCHIVE_MAGIC. Also, 13 checks field _header_size which is not in 11.
>
> I simplified this to check only for CDS_ARCHIVE_MAGIC which is known in 11. I removed the checks for _header_size.
>
> The test too varies a lot between 11 and 13.
>
> Ran it through our testing, and ran the test manually. Both passed.
>
> http://cr.openjdk.java.net/~goetz/wr20/8226406-corrupt_CDS_archive-jdk11/01/
>
> Best regards,
> Goetz
More information about the jdk-updates-dev
mailing list