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

Christian Thalinger christian.thalinger at oracle.com
Tue Mar 19 09:55:51 PDT 2013


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?

-- 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