RFR(XS) 8008811: [parfait] Null pointer deference in hotspot/src/share/vm/opto/loopopts.cpp

Vladimir Kozlov vladimir.kozlov at oracle.com
Tue Mar 19 10:15:47 PDT 2013


On 3/19/13 9:55 AM, Christian Thalinger wrote:
>
> On Mar 19, 2013, at 7:39 AM, Morris Meyer <morris.meyer at oracle.com> wrote:
>
>> Vladimir - thanks for the review.  Here is the updated webrev.  These changes have been through JPRT.
>>
>>         --mm
>>
>> WEBREV - http://cr.openjdk.java.net/~morris/8008811.02
>
> src/share/vm/opto/loopnode.hpp:
>
> +  bool has_node( Node* n ) const {
> +    guarantee(n != NULL, "No Node.");
> +    return _nodes[n->_idx] != NULL;
> +  }
>
> Do we want to check the index here as well?

No need in this case:

   Node *operator[] ( uint i ) const // Lookup, or NULL for not mapped
   { return (i<_max) ? _nodes[i] : (Node*)NULL; }

Morris, the changes are good.

Thanks,
Vladimir

>
> -- Chris
>
>>
>>
>> On 3/5/13 6:07 PM, Vladimir Kozlov wrote:
>>> In loopnode.hpp reverse check to != NULL so that real code will be first.
>>>
>>> In loopnode.cpp check dp != NULL because dp->as_Proj() is reference through dp. as_Proj() is cast.
>>>
>>> bolphi check should be before replace_node() call.
>>>
>>> I don't understand why you need next check:
>>> if (reg == NULL) return NULL;
>>>
>>> insert_region_before_proj() returns "reg = new (C)RegionNode(2)" so it can't be NULL.
>>>
>>> Thanks,
>>> Vladimir
>>>
>>> On 3/5/13 2:22 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/8008811.01
>>>> BUG - https://jbs.oracle.com/bugs/browse/JDK-8008811
>>
>


More information about the hotspot-compiler-dev mailing list