RFR(XS) 8008750 [partfait] Null pointer deference in hotspot/src/share/vm/oops/instanceKlass.hpp

Vladimir Kozlov vladimir.kozlov at oracle.com
Tue Mar 5 15:16:19 PST 2013


On 3/5/13 2:39 PM, Coleen Phillimore wrote:
>
> Oh, I see.  Can you still use assert rather then ShouldNotReachHere()?
> The former will vanish in product but the latter is added in product.

Yes, I think we can remove "else { ShouldNotReachHere();" in header file 
instanceKlass.hpp and add assert. Method set_host_klass() has the assert 
already, we need to add assert to set_implementor().

Also in instanceKlass.cpp, Morris, could you reverse check 
InstanceKlass::clean_implementors_list()?

Thanks,
Vladimir

>
> Coleen
>
> On 03/05/2013 05:17 PM, Vladimir Kozlov wrote:
>> We want to fix cases where Parfait gives "false" positives. That is
>> why we need real != NULL check, assert does not help.
>>
>> Vladimir
>>
>> On 3/5/13 1:50 PM, Coleen Phillimore wrote:
>>> I can't see the parfait link in the bug.
>>>
>>> What does this change do but check for null in the cases where host
>>> class and adr_implementers can't be null?
>>>
>>> In instanceKlass.hpp ShouldNotReachHere() is enabled in product so these
>>> should be
>>> assert(host != NULL, "not null");
>>> *adr = host;
>>>
>>> I don't understand the motivation for this change and would rather not
>>> enable these ShouldNotReachHere() in product mode, ie use asserts
>>> instead.
>>>
>>> Coleen
>>>
>>> On 03/05/2013 03:51 PM, Vladimir Kozlov wrote:
>>>> Looks good. CC to runtime group.
>>>>
>>>> Vladimir
>>>>
>>>> On 3/5/13 12:37 PM, Morris Meyer wrote:
>>>>> Folks,
>>>>>
>>>>> Could I get a review for this parfait issue? This has been through
>>>>> JPRT.
>>>>>
>>>>> Thanks much,
>>>>>
>>>>>          --mm
>>>>>
>>>>> WEBREV - http://cr.openjdk.java.net/~morris/8008750.01
>>>>> BUG - https://jbs.oracle.com/bugs/browse/JDK-8008750
>>>
>


More information about the hotspot-runtime-dev mailing list