RFR(XS) 8191585 VM anonymous classes created during CDS dump time cause crash
Ioi Lam
ioi.lam at oracle.com
Tue Mar 6 19:20:12 UTC 2018
Hi,
Please review this small VM change and the corresponding test case.
https://bugs.openjdk.java.net/browse/JDK-8191585
http://cr.openjdk.java.net/~iklam/jdk11/8191585-vm-anon-classes-cause-dumping-crash.v01/
The crash happens in the following code:
class CombineDictionariesClosure : public CLDClosure {
void do_cld(ClassLoaderData* cld) {
if (cld->is_system_class_loader_data() ||
cld->is_platform_class_loader_data()) {
for (int i = 0; i < cld->dictionary()->table_size(); ++i) {
^^^^^^^^^^^ == NULL
The bug is in cld->is_system_class_loader_data() -- the CLD of anon
classes have a NULL
cld::dictionary(), but its cld::class_loader() returns the loader object
of the holder
class.
The fix is to reject if cld::is_anonymous() is true.
Thanks
- Ioi
More information about the hotspot-runtime-dev
mailing list