RFR: 8324121: SIGFPE in PhaseIdealLoop::extract_long_range_checks [v2]
Roland Westrelin
roland at openjdk.org
Fri Mar 22 16:37:22 UTC 2024
On Wed, 20 Mar 2024 18:49:33 GMT, Dean Long <dlong at openjdk.org> wrote:
>> src/hotspot/share/opto/loopnode.cpp line 1110:
>>
>>> 1108: if (loop->is_range_check_if(if_proj, this, T_LONG, phi, range, offset, scale) &&
>>> 1109: loop->is_invariant(range) && loop->is_invariant(offset) &&
>>> 1110: original_iters_limit / ABS(scale) >= min_iters * ABS(stride_con)) {
>>
>> I assume there is check somewhere that `stride_con` is not `MIN_INT`.
>
> In my opinion ABS() should assert that it has legal input (not MIN_INT) and output (non-negative value) in debug builds.
Thanks for reviewing this.
We can't get to this code if `stride_con` is `MIN_INT` because some other condition (that doesn't explicitly check that `stride_con` is not `MIN_INT`) causes a bail out from the transformation. I added an explicit bail out in that case in a new commit anyway to make the code more robust.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/18397#discussion_r1535866603
More information about the hotspot-compiler-dev
mailing list