RFR: JDK-8263558: Possible NULL dereference in fast path arena free if ZapResourceArea is true

Thomas Stuefe stuefe at openjdk.java.net
Mon Mar 15 05:59:27 UTC 2021


On Sun, 14 Mar 2021 06:09:26 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:

> Sonarcloud reports a possible NULL dereference when zapping the to-be-freed area in fast-path arena free. Possible call stack for this to happen starts in Node::destruct(PhaseValues* phase).

Thanks Kim. I changed the fix to fix the one caller I was sure about passing NULL, and assert in AFree instead. 

I removed the Trivial mark. Before pushing I will put this through tests to check if it triggers. I believe even though the pointer arithmetic below was UB with NULL, the effect would have in general been benign (just refusing to free anything).

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

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


More information about the hotspot-runtime-dev mailing list