Integrated: 8301876: Crash in DumpTimeClassInfo::add_verification_constraint

Ioi Lam iklam at openjdk.org
Thu Feb 9 00:33:54 UTC 2023


On Wed, 8 Feb 2023 07:26:13 GMT, Ioi Lam <iklam at openjdk.org> wrote:

> When dumping the a dynamic CDS archive, we clone and restore the `SystemDictionaryShared::_dumptime_table` (see [JDK-8264735](https://bugs.openjdk.org/browse/JDK-8264735).)
> 
> The bug is that for generated classes such as ` jdk/proxy2/$Proxy16` that are excluded from the CDS dump, we incorrectly remove their `DumpTimeClassInfo` from the `_dumptime_table` clone. After the dynamic archive has finished dumping, there's a very small window of time where some Java code would be executed and cause ` jdk/proxy2/$Proxy16` to be verified. This will cause the following crash because we can't find a `DumpTimeClassInfo` for this class. 
> 
> 
> DumpTimeSharedClassTable::get_info()
> SystemDictionaryShared::get_info()
> SystemDictionaryShared::add_verification_constraint()
> VerificationType::is_reference_assignable_from()
> ClassVerifier::verify_exception_handler_table()
> ClassVerifier::verify_method()
> ClassVerifier::verify_class()
> Verifier::verify()
> InstanceKlass::link_class_impl() -- for  jdk/proxy2/$Proxy16
> 
> 
> The fix is simple -- always copy all  `DumpTimeClassInfo` when cloning  `_dumptime_table` .

This pull request has now been integrated.

Changeset: dc6d52ce
Author:    Ioi Lam <iklam at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/dc6d52cea54eb8c8793dd0f46002c28ec43d9d2c
Stats:     5 lines in 1 file changed: 0 ins; 2 del; 3 mod

8301876: Crash in DumpTimeClassInfo::add_verification_constraint

Reviewed-by: ccheung, matsaave

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

PR: https://git.openjdk.org/jdk/pull/12467


More information about the hotspot-runtime-dev mailing list