[jdk16] RFR: 8258236: Segfault in ClassListParser::resolve_indy dumping static AppCDS archive

Calvin Cheung ccheung at openjdk.java.net
Wed Dec 16 02:32:56 UTC 2020


On Wed, 16 Dec 2020 01:31:44 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:

>> Please review this change for JDK 16.
>> 
>> In ClassListParser::resolve_indy, if a class has previously failed verification, don't proceed with resolve indy for that class to avoid dereferencing a null cpcache pointer.
>> 
>> Passed tiers 1,2,3,4 tests.
>
> I just have questions.  The change as-is is good.

>For this change, don't change it to CHECK in case something new will fail, and any new exceptions will caught by checking k != NULL. It just looks strange but can be cleaned up later.

I was thinking the same - do the clean up later. Initial local testing looks good - no new cds/appcds tests failure.

>Okay so you're trying to catch a previous link time failure. Why do you expect the next try_link_class call to never fail?

Previous link time failure was recorded via `SystemDictionaryShared::set_class_has_failed_verification(ik)`.
`try_link_class` will not result in an exception because there's a `if (HAS_PENDING_EXCEPTION)` block which calls `CLEAR_PENDING_EXCEPTION`.

-------------

PR: https://git.openjdk.java.net/jdk16/pull/30


More information about the hotspot-runtime-dev mailing list