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

Thomas Stuefe stuefe at openjdk.org
Mon Nov 28 13:59:52 UTC 2022


On Mon, 28 Nov 2022 13:38:53 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:

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

It is a matter of taste I guess. I don't find DEBUG_ONLY etc offensive, since I see with one glance which coding runs. Now one needs to look up the definition of the flag to know it gets inlined out for product builds.

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

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


More information about the hotspot-runtime-dev mailing list