Skip to content

Commit

Permalink
[PA] Namespace migration (31-omake of N)
Browse files Browse the repository at this point in the history
This CL trivially qualifies `CPU` as `base::CPU` inside the
PartitionAlloc unit test. This is being done to separate this slightly
noisy patch from migration CL no. 32.

Bug: 1288247
Change-Id: Id80e5693502860d33a6b4bb496b21f1baba655c5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3574354
Reviewed-by: Yuki Shiino <yukishiino@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Kalvin Lee <kdlee@chromium.org>
Cr-Commit-Position: refs/heads/main@{#990255}
  • Loading branch information
Kalvin Lee authored and Chromium LUCI CQ committed Apr 8, 2022
1 parent 38408e8 commit 1c23be8
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions base/allocator/partition_allocator/partition_alloc_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2221,7 +2221,7 @@ TEST_P(PartitionAllocDeathTest, DirectMapGuardPages) {
TEST_P(PartitionAllocTest, MTEProtectsFreedPtr) {
// This test checks that Arm's memory tagging extension is correctly
// protecting freed pointers. Writes to a freed pointer should cause a crash.
CPU cpu;
base::CPU cpu;
if (!cpu.has_mte()) {
// This test won't pass on non-MTE systems.
GTEST_SKIP();
Expand Down Expand Up @@ -2255,7 +2255,7 @@ TEST_P(PartitionAllocTest, MTEProtectsFreedPtr) {
#if !BUILDFLAG(USE_BACKUP_REF_PTR) && defined(PA_HAS_FREELIST_SHADOW_ENTRY)

TEST_P(PartitionAllocDeathTest, UseAfterFreeDetection) {
CPU cpu;
base::CPU cpu;
void* data = allocator.root()->Alloc(100, "");
allocator.root()->Free(data);

Expand All @@ -2266,7 +2266,7 @@ TEST_P(PartitionAllocDeathTest, UseAfterFreeDetection) {
}

TEST_P(PartitionAllocDeathTest, FreelistCorruption) {
CPU cpu;
base::CPU cpu;
const size_t alloc_size = 2 * sizeof(void*);
void** fake_freelist_entry =
static_cast<void**>(allocator.root()->Alloc(alloc_size, ""));
Expand All @@ -2290,7 +2290,7 @@ TEST_P(PartitionAllocDeathTest, FreelistCorruption) {
// With DCHECK_IS_ON(), cookie already handles off-by-one detection.
#if !DCHECK_IS_ON()
TEST_P(PartitionAllocDeathTest, OffByOneDetection) {
CPU cpu;
base::CPU cpu;
const size_t alloc_size = 2 * sizeof(void*);
char* array = static_cast<char*>(allocator.root()->Alloc(alloc_size, ""));
if (cpu.has_mte()) {
Expand All @@ -2313,7 +2313,7 @@ TEST_P(PartitionAllocDeathTest, OffByOneDetection) {
}

TEST_P(PartitionAllocDeathTest, OffByOneDetectionWithRealisticData) {
CPU cpu;
base::CPU cpu;
const size_t alloc_size = 2 * sizeof(void*);
void** array = static_cast<void**>(allocator.root()->Alloc(alloc_size, ""));
char valid;
Expand Down

0 comments on commit 1c23be8

Please sign in to comment.