RFR: 8286876: NMT.test_unaliged_block_address_vm_assert fails if using clang toolchain [v2]

Johan Sjölen jsjolen at openjdk.org
Mon Dec 5 13:16:40 UTC 2022


On Fri, 2 Dec 2022 15:48:17 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:

>> src/hotspot/share/services/mallocHeader.hpp line 139:
>> 
>>> 137:   // If block is broken, print out a report to tty (optionally with
>>> 138:   // hex dump surrounding the broken block), then trigger a fatal error
>>> 139:   inline static MallocHeader* assert_block_integrity(const void* memblock);
>> 
>> Proposal: rename to `malloc_header_with_checks()`, and possibly move the existing `malloc_header` here?
>
> Also, I think this should, like the MemTracker::malloc_header variants, exist in two forms. One that takes and gives out const pointers, one that does non-const. I would not cast away the constness.

Fixed this with a templated private variant that the other functions instantiate.

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

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


More information about the hotspot-runtime-dev mailing list