RFR(S) 8244764 Improve assertion for CPP_VTABLE_PATCH_TYPES_DO

Ioi Lam ioi.lam at oracle.com
Wed Jun 24 00:09:19 UTC 2020


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
   CPP_VTABLE_PATCH_TYPES_DO


(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


More information about the hotspot-runtime-dev mailing list