JDK-8238438 : SuperWord::co_locate_pack picks memory state of first instead of last load
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 11.0.7,11.0.7-oracle,14,15
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2020-02-03
  • Updated: 2020-06-09
  • Resolved: 2020-03-02
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 13 JDK 14 JDK 15
11.0.7Fixed 13.0.4Fixed 14.0.2Fixed 15 b13Fixed
Related Reports
Relates :  
Relates :  
Description
See the test and results in attachment. To reproduce run:
lmesnik@lmesnik-linux:~/Downloads/r2-341$ java -Xmx1G -Xcomp -Xbatch -XX:-TieredCompilation -XX:CompileOnly=Test Test > t2
lmesnik@lmesnik-linux:~/Downloads/r2-341$ java Test > t1 
lmesnik@lmesnik-linux:~/Downloads/r2-341$ diff t1 t2
8c8
< vMeth2_check_sum: 76938300011633752
---
> vMeth2_check_sum: 76938300011612984
18c18
< vMeth2_check_sum: 144510166892263619
---
> vMeth2_check_sum: 144510166892242851
28c28
< vMeth2_check_sum: 212082033772893486
---
> vMeth2_check_sum: 212082033772872718
38c38
< vMeth2_check_sum: 279653900653523353
---
> vMeth2_check_sum: 279653900653502585
48c48
< vMeth2_check_sum: 347225767534153220
---
> vMeth2_check_sum: 347225767534132452
58c58
< vMeth2_check_sum: 414797634414783087
---
> vMeth2_check_sum: 414797634414762319
68c68
< vMeth2_check_sum: 482369501295412954
---
> vMeth2_check_sum: 482369501295392186
78c78
< vMeth2_check_sum: 549941368176042821
---
> vMeth2_check_sum: 549941368176022053
88c88
< vMeth2_check_sum: 617513235056672688
---
> vMeth2_check_sum: 617513235056651920
98c98
< vMeth2_check_sum: 685085101937302555
---
> vMeth2_check_sum: 685085101937281787

Comments
Fix request (13u) I'd like to port it to 13u, too. Applies clean, tier1 OK, new test does behave as expected.
09-06-2020

Fix Request (JDK 14.0.2) This patch fixes a regression introduced by JDK-8233032 and has already been backported to JDK 11u. The fix is medium risk and applies cleanly to JDK 14.0.2. In addition to CI testing through all tiers in JDK 15 and 11u, additional testing will be executed in JDK 14.0.2 before pushing.
06-03-2020

Fix request (11u) We see issues in out internal testing of 11.0.7 which I narrowed down to JDK-8233032. Luckily, this change was just pushed, and it fixes the issue we see. The test included here fails with current jdk11u, and passes after patching this change. I would like to bring it to 11.0.7, as 8233032 is a change of 11.0.7, too. Applies clean.
02-03-2020

URL: https://hg.openjdk.java.net/jdk/jdk/rev/1d64bd5b34e0 User: chagedorn Date: 2020-03-02 10:38:26 +0000
02-03-2020

http://cr.openjdk.java.net/~chagedorn/8238438/webrev.01/ Added assertion code in presumable dead code path which selects the first memory state. We could not find an example that needs to pick the first memory state and neither did testing. If the code is ever executed in a valid use case, the assert(false) and the related assertion code can be removed again. Otherwise, we could clean this code up in JDK 16 and just go with the last memory state. I filed [1] to take care of that later. [1] https://bugs.openjdk.java.net/browse/JDK-8240281
02-03-2020

Could be trace back to JDK-8233032 which was introduced in JDK 14. Results start to differ after this change. Will investigate further and try to extract a simpler test case.
12-02-2020