JDK-8307139 : Fix signed integer overflow in compiler code, part 1
  • Type: Sub-task
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 8-pool,11-pool,17,21
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2023-04-29
  • Updated: 2023-06-15
  • Resolved: 2023-05-11
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 21
21 b23Fixed
Related Reports
Cloners :  
Duplicate :  
Duplicate :  
Description
Running with -ftrapv I found two cases of signed overflow that happen during startup.  immI_Pow2M1 does

  is_power_of_2(n->get_int() + 1)

and _debug_idx code does

  new_debug_idx += bump

which can cause _debug_idx to go negative.

Then I tried tier1 testing and hit two more problems with c1 Canonicalizer::do_Op2 and c2 AddHelper::will_overflow.
Comments
Changeset: 7fcb0fdc Author: Dean Long <dlong@openjdk.org> Date: 2023-05-11 18:06:43 +0000 URL: https://git.openjdk.org/jdk/commit/7fcb0fdcd453d02002b751db6d59ad274b3b59c7
11-05-2023

A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/13767 Date: 2023-05-03 00:22:58 +0000
03-05-2023

ILW = same as JDK-8307138 = P4
01-05-2023