RFR(S) 8226406: JVM fails to detect mismatched or corrupt CDS archive
Jiangli Zhou
jianglizhou at google.com
Mon Jul 8 17:25:41 UTC 2019
Hi Calvin,
On Mon, Jul 8, 2019 at 10:00 AM Calvin Cheung <calvin.cheung at oracle.com> wrote:
>
> Hi Jiangli,
>
> On 7/7/19 5:12 PM, Jiangli Zhou wrote:
> > Hi Calvin,
> >
> > Per our off-mailing-list email exchange from the previous code review
> > for https://bugs.openjdk.java.net/browse/JDK-8211723, I created
> > https://bugs.openjdk.java.net/browse/JDK-8227370, 'Remove
> > SharedPathsMiscInfo'
> Thanks for filing the RFE.
> > . I think the crash caused by premature runtime accessing of
> > _paths_misc_info_size should be handled as part of JDK-8227370, rather
> > than further patching up the SharedPathsMiscInfo
>
> My current patch involves checking most the fields in
> CDSFileMapHeaderBase before accessing other fields. This part is
> applicable to other fields, not only to the _paths_misc_info_size. This
> bug existed for a while and I think it would be a good backport
> candidate for 11u. The patch for JDK-8211723 and the follow-up RFE
> JDK-8227370 are not necessary to be backported to 11u. I'd like to fix
> this bug first and then handle JDK-8227370 as a separate changeset.
That sounds like a good plan. A fix targeted for backporting should
have a clean-cut (less dependency) and controlled scope. Addressing
this incrementally in separate changesets is a suitable approach.
I took a quick look over the weekend and noticed some issues with your
current patch. That's why I suggested to go with the complete removal
without spending extra effort on SharedPathsMiscInfo. I will need to
take a closer look and try to get back to you later today.
Best regards,
Jiangli
>
> thanks,
>
> Calvin
>
> >
> > Thanks and regards,
> > Jiangli
> >
> > On Wed, Jul 3, 2019 at 5:59 PM Calvin Cheung <calvin.cheung at oracle.com> wrote:
> >> bug: https://bugs.openjdk.java.net/browse/JDK-8226406
> >>
> >> webrev: http://cr.openjdk.java.net/~ccheung/8226406/webrev.00/
> >>
> >> This bug was found during a bootcycle build when a shared archive built
> >> by a 64-bit JDK version is used by a 32-bit JDK version. It is due to
> >> some of the important header fields such as the _jvm_ident was not
> >> checked prior to accessinng other fields such as the _paths_misc_info_size.
> >>
> >> This fix involves checking most the fields in CDSFileMapHeaderBase
> >> before accessing other fields.
> >>
> >> Testing: tiers 1-3.
> >>
> >> thanks,
> >>
> >> Calvin
> >>
More information about the hotspot-runtime-dev
mailing list