RFR(XS) JDK-8013830: [parfait] Uninitialised pointer 'Reachblock' may be used as argument

Niclas Adlertz niclas.adlertz at oracle.com
Mon Oct 7 10:14:23 PDT 2013


Hi,

At row 1330 in reg_split.cpp we check if we can split by re-materializing 'def'. We only enter split_Rematerialize() at row 1341 if the 'def' node doesn't have any live range inputs (contains_no_live_range_input(def)).
This means that the condition at split_Rematerialize() at row 377 will never be true when entering from row 1341. Because of this we can pass in NULL at the call on row 1341 instead of the uninitialized pointer 'Reachblock'.

Kind Regards,
Niclas Adlertz


On 2013-10-07 18:18, Roland Westrelin wrote:
> Hi Niclas,
>
>> The uninitialized pointer 'Reachblock' can be replaced with NULL at the call since the node we are re-materializing will not have any live range input (because of contains_no_live_range_input(def)).
>>
>> WEBREV: http://cr.openjdk.java.net/~adlertz/JDK-8013830/webrev00/
>> JBS: https://bugs.openjdk.java.net/browse/JDK-8013830
>
> Can you give more details? Which test in PhaseChaitin::split_Rematerialize() fails/succeeds so that we don't reach
>
>   378         assert(Reachblock != NULL, "Reachblock must be non-NULL");
>   379         Node *rdef = Reachblock[lrg2reach[lidx]];
>
> when contains_no_live_range_input(def)is true?
>
> Roland.
>



More information about the hotspot-compiler-dev mailing list