mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +02:00
8218566: NMT: missing memory tag for assert poison page
Reviewed-by: shade, stuefe
This commit is contained in:
parent
42f34d1076
commit
216049dc47
1 changed files with 4 additions and 1 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -34,6 +34,7 @@
|
|||
#include "gc/shared/collectedHeap.hpp"
|
||||
#include "interpreter/bytecodeHistogram.hpp"
|
||||
#include "interpreter/interpreter.hpp"
|
||||
#include "memory/allocation.hpp"
|
||||
#include "memory/resourceArea.hpp"
|
||||
#include "memory/universe.hpp"
|
||||
#include "oops/oop.inline.hpp"
|
||||
|
@ -51,6 +52,7 @@
|
|||
#include "runtime/vframe.hpp"
|
||||
#include "runtime/vm_version.hpp"
|
||||
#include "services/heapDumper.hpp"
|
||||
#include "services/memTracker.hpp"
|
||||
#include "utilities/defaultStream.hpp"
|
||||
#include "utilities/events.hpp"
|
||||
#include "utilities/formatBuffer.hpp"
|
||||
|
@ -721,6 +723,7 @@ static ucontext_t g_stored_assertion_context;
|
|||
void initialize_assert_poison() {
|
||||
char* page = os::reserve_memory(os::vm_page_size());
|
||||
if (page) {
|
||||
MemTracker::record_virtual_memory_type(page, mtInternal);
|
||||
if (os::commit_memory(page, os::vm_page_size(), false) &&
|
||||
os::protect_memory(page, os::vm_page_size(), os::MEM_PROT_NONE)) {
|
||||
g_assert_poison = page;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue