RFR: 8324121: SIGFPE in PhaseIdealLoop::extract_long_range_checks

Dean Long dlong at openjdk.org
Wed Mar 20 18:52:22 UTC 2024


On Wed, 20 Mar 2024 18:23:08 GMT, Vladimir Kozlov <kvn at openjdk.org> wrote:

>> Both failures occur because `ABS(scale * stride_con)` overflows (scale
>> a really large long number). I reworked the test so overflow is no
>> longer an issue.
>
> 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.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/18397#discussion_r1532629022


More information about the hotspot-compiler-dev mailing list