RFR: JDK-8302594: use-after-free in Node::destruct [v2]

Justin King jcking at openjdk.org
Wed Feb 15 20:30:54 UTC 2023


On Wed, 15 Feb 2023 19:47:35 GMT, Justin King <jcking at openjdk.org> wrote:

>> src/hotspot/share/opto/node.cpp line 655:
>> 
>>> 653:   _in = _out = (Node**) badAddress;
>>> 654:   _max = _cnt = _outmax = _outcnt = 0;
>>> 655:   compile->remove_modified_node(this);
>> 
>> `remove_modified_node(this)` should be called before we trash node's fields.
>
> Shouldn't remove_modified_node always be called, regardless of build type? Having it in an ASSERT block is wierd.

Also moved it up to just before smashing the vtbl.

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

PR: https://git.openjdk.org/jdk/pull/12577


More information about the hotspot-compiler-dev mailing list