RFR(XS) 8010500: [parfait] Possible null pointer dereference at hotspot/src/share/vm/opto/loopnode.hpp

Vladimir Kozlov vladimir.kozlov at oracle.com
Mon Feb 17 12:04:53 PST 2014

get_pre_loop_end() is called in 3 places during superword optimization. First time it is called during initialization of 
superword in transform_loop() where we bailout from the optimization if it is NULL:

   // Check for pre-loop ending with CountedLoopEnd(Bool(Cmp(x,Opaque1(limit))))
   CountedLoopEndNode* pre_end = get_pre_loop_end(cl);
   if (pre_end == NULL) return;

So it is fine to have asserts after that point in other call sites.


On 2/17/14 11:58 AM, David Chase wrote:
> I am not a Reviewer, but is this the best way to address a Parfait warning?
> I don't see any reasoning, either in the bug report comments or in the patch, about how
> the null pointer should not actually appear, and the assert merely changes one sort
> of crash into another for debug and fastdebug builds.
> David
> On 2014-02-17, at 3:49 PM, Niclas Adlertz <niclas.adlertz at oracle.com> wrote:
>> Hi all,
>> Could I please have a review for this very small fix?
>> http://cr.openjdk.java.net/~adlertz/JDK-8010500/webrev00/
>> https://bugs.openjdk.java.net/browse/JDK-8010500
>> Kind Regards,
>> Niclas Adlertz

More information about the hotspot-compiler-dev mailing list