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

Incorrect result with C2 compiled code

    XMLWordPrintable

Details

    Description

      ADDITIONAL SYSTEM INFORMATION :
      Microsoft Windows 10 Professional
      10.0.19044 Build 19044
      AMD Ryzen 5 5600G with Radeon Graphics 3.90 GHz
      Memory 32 GB

      openjdk version "1.8.0_332"
      OpenJDK Runtime Environment (Temurin)(build 1.8.0_332-b09)
      OpenJDK 64-Bit Server VM (Temurin)(build 25.332-b09, mixed mode)

      openjdk version "11.0.15" 2022-04-19
      OpenJDK Runtime Environment Temurin-11.0.15+10 (build 11.0.15+10)
      OpenJDK 64-Bit Server VM Temurin-11.0.15+10 (build 11.0.15+10, mixed mode)

      A DESCRIPTION OF THE PROBLEM :
      In testCase18, we call the checksum function several times in the test() function. When we run the test case using JDK11 we get the correct result 13320000. But if we set the -Xcomp flag, JDK11 outputs incorrect results 13320003 from the test case .
      It is worth noting that this issue does not exist on JDK8.

      REGRESSION : Last worked in version 8

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      In order to reproduce the issue more conveniently, we uploaded the corresponding test case to Google Drive so that it can be downloaded using the URL below.
      https://drive.google.com/file/d/1NNfTtQB8XycL7Np2MF2thReul5a0AYQX/view?usp=sharing

      For submitted test cases, we execute
      Hotspot8/bin/java testCase18
      Hotspot8/bin/java -Xcomp testCase18
      Hotspot11/bin/java testCase18
      Hotspot11/bin/java -Xcomp testCase18

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      13320000
      13320000
      13320000
      13320000
      ACTUAL -
      13320000
      13320000
      13320000
      13320003

      FREQUENCY : always


      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              webbuggrp Webbug Group
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: