[11u] RFR: 8226406: JVM fails to detect mismatched or corrupt CDS archive
Jiangli Zhou
jianglizhou at google.com
Thu Jan 30 18:35:54 UTC 2020
Hi Goetz,
My testing result looks good.
On Wed, Jan 29, 2020 at 10:51 AM Lindenmaier, Goetz
<goetz.lindenmaier at sap.com> wrote:
>
> Hi Jiangli,
>
> thanks for your review! I will add a comment.
> I thought better leave this in, in case the other functionality
> will be downported one can see this is needed, too.
SGTM.
Best regards,
Jiangli
>
> Best regards,
> Goetz
>
> > -----Original Message-----
> > From: Jiangli Zhou <jianglizhou at google.com>
> > Sent: Mittwoch, 29. Januar 2020 00:20
> > To: Lindenmaier, Goetz <goetz.lindenmaier at sap.com>
> > Cc: jdk-updates-dev at openjdk.java.net; hotspot-runtime-dev at openjdk.java.net
> > Subject: Re: [11u] RFR: 8226406: JVM fails to detect mismatched or corrupt
> > CDS archive
> >
> > 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