mirror of
https://github.com/openjdk/jdk.git
synced 2026-03-14 18:03:44 +00:00
8364198: NMT should have a better corruption message
Reviewed-by: kvn, stuefe
This commit is contained in:
parent
3fe0d29ec3
commit
2202156acc
@ -104,7 +104,7 @@ inline OutTypeParam MallocHeader::resolve_checked_impl(InTypeParam memblock) {
|
||||
OutTypeParam header_pointer = (OutTypeParam)memblock - 1;
|
||||
if (!header_pointer->check_block_integrity(msg, sizeof(msg), &corruption)) {
|
||||
header_pointer->print_block_on_error(tty, corruption != nullptr ? corruption : (address)header_pointer);
|
||||
fatal("NMT corruption: Block at " PTR_FORMAT ": %s", p2i(memblock), msg);
|
||||
fatal("NMT has detected a memory corruption bug. Block at " PTR_FORMAT ": %s", p2i(memblock), msg);
|
||||
}
|
||||
return header_pointer;
|
||||
}
|
||||
|
||||
@ -35,7 +35,7 @@
|
||||
|
||||
// This prefix shows up on any c heap corruption NMT detects. If unsure which assert will
|
||||
// come, just use this one.
|
||||
#define COMMON_NMT_HEAP_CORRUPTION_MESSAGE_PREFIX "NMT corruption"
|
||||
#define COMMON_NMT_HEAP_CORRUPTION_MESSAGE_PREFIX "NMT has detected a memory corruption bug."
|
||||
|
||||
#define DEFINE_TEST(test_function, expected_assertion_message) \
|
||||
TEST_VM_FATAL_ERROR_MSG(NMT, test_function, ".*" expected_assertion_message ".*") { \
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user