From a8e2347d240a6566e8bb795cab4464c19b5487e5 Mon Sep 17 00:00:00 2001 From: Anees Iqbal Date: Fri, 20 Nov 2026 13:54:12 -0800 Subject: [PATCH] :white_check_mark: Name the sole-holder test's remapped address its own The file-pages test named the second mapping of its sole-holder memory `second`, the name the same scope's copy-on-write case gives its source buffer, so the test did not compile. --- guest/bundle/tests/serializer_tests.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/guest/bundle/tests/serializer_tests.cpp b/guest/bundle/tests/serializer_tests.cpp index 17951ddd0..99d06bd8b 100644 --- a/guest/bundle/tests/serializer_tests.cpp +++ b/guest/bundle/tests/serializer_tests.cpp @@ -4934,14 +4934,14 @@ void test_file_pages_classify() CHECK(held.clause == kRgfxFileNeither && held.why == kRgfxNeitherNotAFile); mach_port_deallocate(mach_task_self(), entry); CHECK(pageAt(anon).ref_count == 1 && soleHolder()); - mach_vm_address_t second = 0; - vm_prot_t secondCur = VM_PROT_NONE, secondMax = VM_PROT_NONE; - CHECK(mach_vm_remap(mach_task_self(), &second, mapped, 0, VM_FLAGS_ANYWHERE, mach_task_self(), - reinterpret_cast(anon), false, &secondCur, &secondMax, + mach_vm_address_t remapped = 0; + vm_prot_t remapCur = VM_PROT_NONE, remapMax = VM_PROT_NONE; + CHECK(mach_vm_remap(mach_task_self(), &remapped, mapped, 0, VM_FLAGS_ANYWHERE, mach_task_self(), + reinterpret_cast(anon), false, &remapCur, &remapMax, VM_INHERIT_NONE) == KERN_SUCCESS); - CHECK((secondMax & VM_PROT_WRITE) == 0 && pageAt(anon).ref_count == 2); + CHECK((remapMax & VM_PROT_WRITE) == 0 && pageAt(anon).ref_count == 2); CHECK(rgfxFilePagesOf(anon + into, length, true).clause == kRgfxFileNeither); - mach_vm_deallocate(mach_task_self(), second, mapped); + mach_vm_deallocate(mach_task_self(), remapped, mapped); CHECK(pageAt(anon).ref_count == 1 && soleHolder()); // Asked for its regions' footprint: a count of 1 with an id of none of its objects, neither. int footprint = 1;