JDK-8212937 : Parent class loader may not have a referred ClassLoaderData instance when obtained in Klass::class_in_module_of_loader
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 11.0.1,12
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2018-10-24
  • Updated: 2019-09-27
  • Resolved: 2018-11-07
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 11 JDK 12
11.0.3Fixed 12 b19Fixed
Description
Parent class loader may not have a referred ClassLoaderData instance when obtained in Klass::class_in_module_of_loader method. This situation triggers assertions in debug builds and crashes the JVM with a null dereferencing in release builds. 

ClassLoaderData instance may be null if, for instance, the class loader never defined a class.
Comments
Thanks Rob. It was just one comment above: http://mail.openjdk.java.net/pipermail/hotspot-dev/2018-November/035244.html in particular: http://mail.openjdk.java.net/pipermail/hotspot-dev/2018-November/035254.html (Lois) and http://mail.openjdk.java.net/pipermail/hotspot-dev/2018-November/035442.html (Coleen)
30-11-2018

Thanks Severin - can you provide a pointer to the codereview?
29-11-2018

Fix Request: Please approve this backport to JDK 11. While it's an issue only in an error path under a condition where the parent class loader never defined a class, it crashes the JVM nevertheless in those cases. The risk is minimal as it's only affecting the error path. The JDK 12 patch does not apply cleanly. The JDK 11 patch has been reviewed by Lois Foltan and Coleen Phillimore: JDK 11 webrev: http://cr.openjdk.java.net/~sgehwolf/webrevs/JDK-8212937/jdk11/webrev.01/ Testing: tier1 tests and new regression test.
27-11-2018

JDK 11 backport review request: http://mail.openjdk.java.net/pipermail/hotspot-dev/2018-November/035244.html
16-11-2018