RFR: 8283441: C2: segmentation fault in ciMethodBlocks::make_block_at(int) [v3]
Dean Long
dlong at openjdk.java.net
Mon Apr 25 21:05:00 UTC 2022
On Mon, 25 Apr 2022 06:43:33 GMT, Tobias Hartmann <thartmann at openjdk.org> wrote:
>> Dean Long has updated the pull request incrementally with one additional commit since the last revision:
>>
>> reformat
>
> src/hotspot/share/ci/ciMethodBlocks.cpp line 151:
>
>> 149: cur_block->set_control_bci(bci);
>> 150: if (s.next_bci() < limit_bci) {
>> 151: ciBlock *fall_through = make_block_at(s.next_bci());
>
> I see that we already have this check in place for some usages of `make_block_at`. Could we simply move the checks into that method (and assert `!= NULL` at use sides where this should never happen)?
>
> If not, can we at least remove the unused local variables? Like so:
>
> Suggestion:
>
> make_block_at(s.next_bci());
My first attempt was to use a macro MAKE_BLOCK_AT_FALLTHROUGH, but decided to minimize code changes instead, especially since the same pattern is used in the c1 code.
The unused local is used in several places in that function. It seems to be a way to self-ducument the code without using a comment. If I remove the unused local in one place, then I should probably do it everywhere and add more comments.
-------------
PR: https://git.openjdk.java.net/jdk/pull/8374
More information about the hotspot-compiler-dev
mailing list