RFR (S) 8197780: Null pointer dereference in Klass::is_instance_klass of klass.hpp:532

Lois Foltan lois.foltan at oracle.com
Thu Feb 22 16:42:06 UTC 2018


On 2/22/2018 10:46 AM, coleen.phillimore at oracle.com wrote:

> Summary: Make generate_class_cast_message able to deal with NULL klass 
> from the constant pool.
>
> Also moved the function to get the class loader/module name to Klass 
> where it belongs and removed an unused function in the constant pool 
> that looks like the one I ended up using.
>
> Tested with tier1 and which includes the test added for the original 
> change and compiler test that has null klass in the constant pool 
> entry: compiler/escapeAnalysis/cr6716441/Tester.java
>
> open webrev at http://cr.openjdk.java.net/~coleenp/8197780.01/webrev
> bug link https://bugs.openjdk.java.net/browse/JDK-8197780

Looks good.  I like the move of class_loader_and_module_name to Klass.  
Please consider

- adding the same comment about the caller (or one of its callers) must 
use a ResourceMark
   ahead of the SharedRuntime::generate_class_cast_message(Klass*, 
Klass*, Symbol*) method.
- adding an assert to make sure if target_klass == NULL, then 
target_klass_name != NULL.

I don't need to see another webrev.

Thanks,
Lois

>
> Thanks,
> Coleen



More information about the hotspot-runtime-dev mailing list