RFR: 8260338: Some fields in HaltNode is not cloned

Xin Liu xliu at openjdk.java.net
Mon Jan 25 06:25:41 UTC 2021


On Mon, 25 Jan 2021 01:53:56 GMT, Yasumasa Suenaga <ysuenaga at openjdk.org> wrote:

> 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.

src/hotspot/share/opto/node.cpp line 571:

> 569:     n->as_SafePoint()->clone_replaced_nodes();
> 570:   }
> 571:   if (n->is_Halt()) {

This line seems unnecessary. I see HaltNode::size() increases from 0x60 to 0x70 with your patch.  Memcpy at line 502 covers it, doesn't it?

-------------

PR: https://git.openjdk.java.net/jdk/pull/2213


More information about the hotspot-compiler-dev mailing list