[11] RFR(XS): 8197828: Null pointer dereference in MultiNode::proj_out_or_null

dean.long at oracle.com dean.long at oracle.com
Tue Feb 13 22:23:22 UTC 2018


On 2/13/18 12:32 PM, Vladimir Kozlov wrote:

> On 2/13/18 11:22 AM, dean.long at oracle.com wrote:
>> On 2/13/18 10:37 AM, Tobias Hartmann wrote:
>>
>>> Hi Vladimir,
>>>
>>> On 13.02.2018 18:47, Vladimir Kozlov wrote:
>>>> I think we should do realtime check for NULL and use this->in(0) 
>>>> (allocation's control edge) if Initialize node is
>>>> missing which could happen.
>>> Right, we should do that:
>>> http://cr.openjdk.java.net/~thartmann/8197828/webrev.01/
>>
>> How would we test that it works correctly?  I don't think we ever see 
>> a missing Initialize node here, otherwise we would have seen crashes.
>
> I did see missing Initialize node when I worked on EA. Zero size 
> array. We may not hit it in this code path because it is guarded by 
> several conditions.
>

If we can't hit it, then I vote for leaving it as an assert.  If we can 
hit it, then we need a test to trigger that code path.

dl

> For example ClearArrayNode::step_through() has such check:
>
> http://hg.openjdk.java.net/jdk/hs/file/be873d8c0114/src/hotspot/share/opto/memnode.cpp#l2813 
>
>
> and PhaseMacroExpand::expand_allocate_array()
>
> http://hg.openjdk.java.net/jdk/hs/file/be873d8c0114/src/hotspot/share/opto/macro.cpp#l2022 
>
>
> Vladimir
>
>>
>> dl
>>
>>> Thanks,
>>> Tobias
>>



More information about the hotspot-compiler-dev mailing list