8286876: NMT.test_unaliged_block_address_vm_assert fails if using clang toolchain

Reviewed-by: stuefe, gziemski
This commit is contained in:
Johan Sjölen 2023-02-02 10:14:26 +00:00
parent d097b5e628
commit 7b6ac41ab1
6 changed files with 51 additions and 30 deletions

View file

@ -726,8 +726,7 @@ void* os::realloc(void *memblock, size_t size, MEMFLAGS memflags, const NativeCa
// Perform integrity checks on and mark the old block as dead *before* calling the real realloc(3) since it
// may invalidate the old block, including its header.
MallocHeader* header = MallocTracker::malloc_header(memblock);
header->assert_block_integrity(); // Assert block hasn't been tampered with.
MallocHeader* header = MallocHeader::resolve_checked(memblock);
const MallocHeader::FreeInfo free_info = header->free_info();
header->mark_block_as_dead();