RFR (S) 8197780: Null pointer dereference in Klass::is_instance_klass of klass.hpp:532
coleen.phillimore at oracle.com
coleen.phillimore at oracle.com
Thu Feb 22 19:41:10 UTC 2018
On 2/22/18 11:42 AM, Lois Foltan wrote:
> 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.
Okay, now all three have that comment!
> - adding an assert to make sure if target_klass == NULL, then
> target_klass_name != NULL.
Okay, I'll make that change too, and rerun small test to make sure this
is right:
+ assert(target_klass != NULL || target_klass_name != NULL, "one must
be provided");
Thanks!
Coleen
>
> I don't need to see another webrev.
>
> Thanks,
> Lois
>
>>
>> Thanks,
>> Coleen
>
More information about the hotspot-runtime-dev
mailing list