JDK-8332388 : Incorrect results produced by OpenJDK 8 when set "-XX:-ReduceBulkZeroing" option
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 8
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: generic
  • CPU: generic
  • Submitted: 2024-04-16
  • Updated: 2024-05-27
  • Resolved: 2024-05-22
Related Reports
Duplicate :  
Description
ADDITIONAL SYSTEM INFORMATION :
macOS version:
```
Software:

    System Software Overview:

      System Version: macOS 13.2 (22D49)
      Kernel Version: Darwin 22.3.0
      Boot Volume: Macintosh HD
      Boot Mode: Normal
      Computer Name: MacBook Pro
      User Name: MacBook
      Secure Virtual Memory: Enabled
      System Integrity Protection: Enabled
      Time since boot: 1 day, 2 hours, 19 minutes

Hardware:

    Hardware Overview:

      Model Name: MacBook Pro
      Model Identifier: MacBookPro18,1
      Model Number: MK193CH/A
      Chip: Apple M1 Pro
      Total Number of Cores: 10 (8 performance and 2 efficiency)
      Memory: 16 GB
      System Firmware Version: 8419.80.7
      OS Loader Version: 8419.80.7
      Activation Lock Status: Disabled
```

OpenJDK version:
```
openjdk version "1.8.0_402"
OpenJDK Runtime Environment (Temurin)(build 1.8.0_402-b06)
OpenJDK 64-Bit Server VM (Temurin)(build 25.402-b06, mixed mode)
```

A DESCRIPTION OF THE PROBLEM :
When executing a test program on OpenJDK 8 with the "-XX:-ReduceBulkZeroing" option enabled, incorrect results are observed. However, if the "-XX:-ReduceBulkZeroing" option is removed, the test program runs normally and produces the expected output.

This bug is specific to OpenJDK 8 and does not affect other versions of the JDK.

The test program can be found at : 

https://drive.google.com/file/d/1BaMa2lFOlYg9JpD6ILAEYjEFsOQ-pOrg/view?usp=sharing

**Expected Behavior:**

The test program should execute normally and output “Finish”.

**Observed Behavior:**

The test program produces wrong results, and output:

```
        Test m2 failed
        source: 
        byte TestInstanceCloneUtils$D.i1 = 0
        short TestInstanceCloneUtils$D.i2 = 1
        long TestInstanceCloneUtils$D.i3 = 2
        int TestInstanceCloneUtils$D.i4 = 3
        int TestInstanceCloneUtils$D.i5 = 4
        result: 
        0
        Finish
```

REGRESSION : Last worked in version 11.0.22

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Please refer to the readme.txt in the attached file.

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The test program should execute normally and output “Finish”.
ACTUAL -
The test program produces wrong results, and output:

```
        Test m2 failed
        source: 
        byte TestInstanceCloneUtils$D.i1 = 0
        short TestInstanceCloneUtils$D.i2 = 1
        long TestInstanceCloneUtils$D.i3 = 2
        int TestInstanceCloneUtils$D.i4 = 3
        int TestInstanceCloneUtils$D.i5 = 4
        result: 
        0
        Finish
```

FREQUENCY : always



Comments
This issue is duplicate of JDK-8248226.
22-05-2024