RFR: 8310606: Fix signed integer overflow, part 3

Andrew Haley aph at openjdk.org
Fri Jun 23 17:49:04 UTC 2023


On Thu, 22 Jun 2023 19:53:19 GMT, Dean Long <dlong at openjdk.org> wrote:

> Most of these changes are straight-forward, but these could use some explaining:
> 
> AllocatePrefetchDistance was accessed before it's dynamic constraint function got run.  I changed it to use static constraints.
> 
> RangeCheckEliminator::update_bound(): for constant bounds with meaningless values, bail out.  For X + c bounds, use Java wrap-around semantics.

src/hotspot/share/jfr/leakprofiler/utilities/granularTimer.cpp line 41:

> 39:   const julong end_time_ticks = (julong)_start_time_ticks.value() + (julong)duration_ticks;
> 40:   _finish_time_ticks = end_time_ticks > (julong)max_jlong ? JfrTicks(max_jlong) : JfrTicks(end_time_ticks);
> 41:   _finished = _finish_time_ticks == _start_time_ticks;

Isn't there a much better way to fix this?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/14619#discussion_r1240105522


More information about the hotspot-dev mailing list