RFR(XS) 8010500: [parfait] Possible null pointer dereference at hotspot/src/share/vm/opto/loopnode.hpp
niclas.adlertz at oracle.com
Mon Feb 17 14:50:41 PST 2014
I'm sorry about that. You are right, I should have added some background
information and reasoning. Luckily Vladimir Kozlov already added some
Sometimes the loop header can be optimized away in IGVN. Because of
this, we need to check if loopnode() (which returns the loop header)
returns NULL in get_pre_loop_end().
The complete pre-loop (header and end) is required for the storeword
As Vladimir said, get_pre_loop_end() is called in three places during
the superword optimization. If get_pre_loop_end() returns NULL the first
time, we abort the optimization. If not, we assume that the complete
pre-loop exists throughout the whole optimization phase. That is why we
add an assert at the two remaning calls to get_pre_loop_end().
On 02/17/2014 07:58 PM, 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.
> 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?
>> Kind Regards,
>> Niclas Adlertz
More information about the hotspot-compiler-dev