8298003: NMT: fatal block printout does not show the correct corruption address

Reviewed-by: shade, mbaesken
This commit is contained in:
Thomas Stuefe 2022-12-03 06:53:56 +00:00
parent 99e2ef49a8
commit c67166f120

View File

@ -55,9 +55,7 @@ inline void MallocHeader::assert_block_integrity() const {
char msg[256];
address corruption = NULL;
if (!check_block_integrity(msg, sizeof(msg), &corruption)) {
if (corruption != NULL) {
print_block_on_error(tty, (address)this);
}
print_block_on_error(tty, corruption != NULL ? corruption : (address)this);
fatal("NMT corruption: Block at " PTR_FORMAT ": %s", p2i(this), msg);
}
}