RFR: 8297138: UB leading to crash in Amalloc with optimized builds

Coleen Phillimore coleenp at openjdk.org
Mon Nov 28 13:46:29 UTC 2022


On Wed, 23 Nov 2022 12:52:04 GMT, Afshin Zafari <duke at openjdk.org> wrote:

> 8297138: UB leading to crash in Amalloc with optimized builds

This looks good to me.

The UseMallocOnly flag is a develop only flag.  Even without #ifdef ASSERT, the code under it is optimized out.  There's no need to litter the code with debug_only() or DEBUG_ONLY() for this and that's error prone, as this bug complains.

Also, yes, I don't know why we have UseMallocOnly anymore.

src/hotspot/share/memory/arena.cpp line 419:

> 417: 
> 418: 
> 419: 

Nit, can you remove this blank line so that there's only one blank line?

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

Marked as reviewed by coleenp (Reviewer).

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


More information about the hotspot-runtime-dev mailing list