JDK-8260338 : Some fields in HaltNode is not cloned
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 11,15,16,17
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2021-01-25
  • Updated: 2021-02-08
  • Resolved: 2021-01-25
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 16 JDK 17
11.0.11Fixed 16.0.1Fixed 17 b07Fixed
Related Reports
Relates :  
Relates :  
Description
I got strange log as following. Contents in `CodeString` is garbled. It seems not to be initialized.

```
[3.155s][trace][codestrings            ] Created CodeString [ d������] (0x7f3804a150)
```

`HaltNode` has two fields - `_reachable` and `_halt_reason`, but they would not be cloned at Node::clone.
Comments
Fix Request (11u) Same reason as for 16u, plus it keeps codebases in sync (I see 11.0.12-oracle). Patch applies cleanly, tier{1,2,3} pass.
04-02-2021

Fix Request (JDK 16u): This bug leads to uninitialized memory being accessed which may lead to incorrect debug information or incorrect removal of the stop instruction in C2 compiled code. The fix is trivial and low risk. The patch applies cleanly to JDK 16u.
28-01-2021

Updated ILW = Uninitialized fields of C2 IR node, leads to incorrect debug information or incorrect removal of stop instruction, disable C2 compilation of affected method = HLM = P3
25-01-2021

Changeset: 09489e28 Author: Yasumasa Suenaga <ysuenaga@openjdk.org> Date: 2021-01-25 09:12:49 +0000 URL: https://git.openjdk.java.net/jdk/commit/09489e28
25-01-2021

Fields have been added by JDK-8225653 and JDK-8022574.
25-01-2021