Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8166140

C1: Possible integer overflow in LIRGenerator::generate_address on several platforms

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 9
    • Fix Version/s: 9
    • Component/s: hotspot
    • Labels:
      None
    • Subcomponent:
    • Resolved In Build:
      b140

      Description

      LIRGenerator::generate_address contains code to simplify constant index/displacement. Code like the following line uses int which may overflow:
      disp += index->as_constant_ptr()->as_jint() << shift;
      We should use 64 bit integer variables on 64 bit platforms.

        Attachments

          Activity

            People

            • Assignee:
              mdoerr Martin Doerr
              Reporter:
              mdoerr Martin Doerr
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: