RFR(S) 8244764 Improve assertion for CPP_VTABLE_PATCH_TYPES_DO

Lois Foltan lois.foltan at oracle.com
Wed Jun 24 16:23:33 UTC 2020

On 6/23/2020 8:09 PM, Ioi Lam wrote:
> https://bugs.openjdk.java.net/browse/JDK-8244764
> http://cr.openjdk.java.net/~iklam/jdk16/8244764-CPP_VTABLE_PATCH_TYPES_DO.v01/ 
> When a new subtype of MetaData is added, CPP_VTABLE_PATCH_TYPES_DO 
> must to be
> updated. However, there was no assertion check for this. In the past, 
> projects
> like Valhalla and Loom would get weird crashes with CDS after they 
> added new
> subclassesof Klass.
> With this patch, you will get a fatal error like this:
> # fatal error: Cannot find C++ vtable for 0x000000080002ec40 -- you
>   probably added a new subtype of Klass or MetaData without updating
> (The code is getting messy. I will clean it up in a subtask:
> JDK-8248186 Move CDS C++ vtable code to cppVtables.cpp)
> Thanks
> - Ioi

Looks good Ioi.  One comment:

line #977: In the switch statement, MetaspaceObj::MethodDataType will 
now be accepted without complaint even though the former comment stated 
"should have been removed in removed_unsharable_info"?


More information about the hotspot-runtime-dev mailing list