RFR: 8370939: C2: SIGSEGV in SafePointNode::verify_input when processing MH call from Compile::process_late_inline_calls_no_inline() [v3]

Damon Fenacci dfenacci at openjdk.org
Tue Nov 4 10:27:56 UTC 2025


On Mon, 3 Nov 2025 13:12:27 GMT, Roland Westrelin <roland at openjdk.org> wrote:

>> src/hotspot/share/opto/node.cpp line 567:
>> 
>>> 565:       n->as_Call()->set_generator(cloned_cg);
>>> 566:       if (cloned_cg->is_mh_late_inline()) {
>>> 567:         C->inc_number_of_mh_late_inlines();
>> 
>> Do you need to decrement the counter when a CallNode with `generator()->is_mh_late_inline()` goes dead?
>
> I think that would make sense. But the only use of that counter (excluding asserts) seems to be:
> 
> https://github.com/openjdk/jdk/blob/ef464d69399e50aee126a4756fe9a9a19e44d3c4/src/hotspot/share/opto/compile.cpp#L829
> 
> Maybe, then, it's simpler to not bother with maintaining an accurate count. See new commits.
> 
> 8352963 added a new call `inc_number_of_mh_late_inlines()` that I remove here because I don't think it's needed. I had a look at the PR for that one and I don't see it discussed. @dafedafe do you remember why you added it?

AFAIR at some point I was getting the same assert failure `assert(_number_of_mh_late_inlines > 0)` and  noticed that we were re-registering method handles for late inlining without incrementing the counter.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/28088#discussion_r2489784177


More information about the hotspot-compiler-dev mailing list