[9] RFR(S): 8142500: missing null checks in IfNode::has_only_uncommon_traps

Vladimir Kozlov vladimir.kozlov at oracle.com
Fri Nov 13 07:46:38 UTC 2015


Top method (one which is compiled) has _caller == NULL.
(An other place GraphKit::transfer_exceptions_into_jvms() but that one should be merged at the end of method parsing).

It would be nice if you say what exact case you have in this bug.

The added code is correct but the comment is confusing because *caller* has to be inlined if we are processing a callee.

Thanks,
Vladimir

On 11/12/15 11:08 PM, Tobias Hartmann wrote:
> Hi,
>
> please review the following patch:
>
> https://bugs.openjdk.java.net/browse/JDK-8142500
> http://cr.openjdk.java.net/~thartmann/8142500/webrev.00/
>
> C2 crashes in 'IfNode::has_only_uncommon_traps()' after calling 'dom_caller->same_calls_as(caller)' because 'dom_caller' or 'caller' is NULL. This may happen if the method containing the corresponding uncommon trap is not inlined and therefore has no caller in its JVMState. We should bail out if either 'dom_caller' or 'caller' is NULL (it's fine if both are NULL).
>
> Since we check that the uncommon traps belong to the same method, this can only happen if the method is recursively inlined.
>
> Tom Rodriguez verified that this solves the problem.
>
> Thanks,
> Tobias
>


More information about the hotspot-compiler-dev mailing list