Commit f7b33be7 authored by Igor Sheludko's avatar Igor Sheludko Committed by V8 LUCI CQ

[rwx][mac] Add missing scopes in ConcurrentAllocator

Bug: v8:12797
Change-Id: Ide50026c7dc35197876e66cc53a7936acb765aa9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3687735
Auto-Submit: Igor Sheludko <ishell@chromium.org>
Reviewed-by: 's avatarDominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80965}
parent cd6afec2
...@@ -102,6 +102,11 @@ void ConcurrentAllocator::MarkLinearAllocationAreaBlack() { ...@@ -102,6 +102,11 @@ void ConcurrentAllocator::MarkLinearAllocationAreaBlack() {
Address limit = lab_.limit(); Address limit = lab_.limit();
if (top != kNullAddress && top != limit) { if (top != kNullAddress && top != limit) {
base::Optional<CodePageHeaderModificationScope> optional_rwx_write_scope;
if (space_->identity() == CODE_SPACE) {
optional_rwx_write_scope.emplace(
"Marking Code objects requires write access to the Code page header");
}
Page::FromAllocationAreaAddress(top)->CreateBlackAreaBackground(top, limit); Page::FromAllocationAreaAddress(top)->CreateBlackAreaBackground(top, limit);
} }
} }
...@@ -111,6 +116,11 @@ void ConcurrentAllocator::UnmarkLinearAllocationArea() { ...@@ -111,6 +116,11 @@ void ConcurrentAllocator::UnmarkLinearAllocationArea() {
Address limit = lab_.limit(); Address limit = lab_.limit();
if (top != kNullAddress && top != limit) { if (top != kNullAddress && top != limit) {
base::Optional<CodePageHeaderModificationScope> optional_rwx_write_scope;
if (space_->identity() == CODE_SPACE) {
optional_rwx_write_scope.emplace(
"Marking Code objects requires write access to the Code page header");
}
Page::FromAllocationAreaAddress(top)->DestroyBlackAreaBackground(top, Page::FromAllocationAreaAddress(top)->DestroyBlackAreaBackground(top,
limit); limit);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment