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

Vladimir Kozlov vladimir.kozlov at oracle.com
Mon Feb 17 12:27:11 PST 2014


Note, the fix is not asserts changes but new check for NULL:

 CountedLoopEndNode *pre_end = p_f->in(0)->as_CountedLoopEnd();

Vladimir

On 2/17/14 12:04 PM, Vladimir Kozlov wrote:

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

// Check for pre-loop ending with CountedLoopEnd(Bool(Cmp(x,Opaque1(limit)))) CountedLoopEndNode* preend = getpreloopend(cl); if (preend == NULL) return; So it is fine to have asserts after that point in other call sites. Thanks, Vladimir 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