RFR: 8260338: Some fields in HaltNode is not cloned [v2]

Yasumasa Suenaga ysuenaga at openjdk.java.net
Mon Jan 25 07:49:57 UTC 2021


On Mon, 25 Jan 2021 07:21:10 GMT, Xin Liu <xliu at openjdk.org> wrote:

>> `_reachable` and `_halt_reason` are available on `HaltNode`, not `Node`,  so I think this condition is necessary.
>> L502 uses the result of `Node::size_of()`, and I overrided it in `HaltNode`. So memory allocation at L501 and memcpy at L502 are safety.
>
> size_of() is a virtual function.  line 500 should use HaltNode::size_of(), which give you 112(0x70) bytes, right?
> I mean memcpy at line 502 should cover HaltNode's member variables.  
> `Copy::conjoint_words_to_lower((HeapWord*)this, (HeapWord*)n, s);`

Ah, you are right, thanks!
I reverted the change for node.cpp.

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

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


More information about the hotspot-compiler-dev mailing list