JDK-8261147 : C2: Node is wrongly marked as reduction resulting in a wrong execution due to wrong vector instructions
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 11,15,16,17
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2021-02-04
  • Updated: 2022-05-20
  • Resolved: 2021-07-09
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 11 JDK 17 JDK 18
11.0.13-oracleFixed 17 b31Fixed 18Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Relates :  
Description
This is just a generic synopsis. Please change accordingly.

The attached fuzzer test produces a different result for C2 compared to C1/interpreter. It starts to fail after JDK-8235673. However, this change only reveals an existing problem by changing the inline decision of the test. By additionally setting -XX:MaxInlineSize=37, the bug can actually be traced back to JDK-8240248.

To reproduce:
$ java -Xint Test.java > xint.log
$ java -Xcomp -XX:CompileOnly=Test Test.java > c2.log

$ diff xint.log c2.log
62c62
< vMeth1_check_sum: -4505034666541838094
---
> vMeth1_check_sum: 8100660520553448565
71c71
< vMeth1_check_sum: 121887261065963647
---
> vMeth1_check_sum: 6886533561546985349
80c80
< vMeth1_check_sum: 4748809188657399033
---
> vMeth1_check_sum: 5672397492800002690
89c89
< vMeth1_check_sum: -9071012959872778812
---
> vMeth1_check_sum: 4458264447119787987



Comments
Fix Request (11u): Should get backported for parity with 11.0.13-oracle. Applies almost cleanly. Review: https://github.com/openjdk/jdk11u-dev/pull/164
26-07-2021

Changeset: f791fdf2 Author: Christian Hagedorn <chagedorn@openjdk.org> Date: 2021-07-09 11:53:45 +0000 URL: https://git.openjdk.java.net/jdk17/commit/f791fdf23ef6e49e7e1ca68e33a16f6686e0bfa1
09-07-2021

JDK-8240248 only revealed an existing problem introduced with the initial RFE for reductions (JDK-8074981).
07-07-2021

ILW = Incorrect execution of compiled code, reproducible with Fuzzer generated test, disable superword = HMM = P2
05-02-2021