Loading...
framework/ProcessScavenger.cpp dyld-1340 dyld-1285.19
--- dyld/dyld-1340/framework/ProcessScavenger.cpp
+++ dyld/dyld-1285.19/framework/ProcessScavenger.cpp
@@ -42,7 +42,6 @@
 #include "Header.h"
 #include "DyldSharedCache.h"
 #include "Vector.h"
-#include "SafeVMPrimitives.h"
 
 #include <sys/fsgetpath.h>
 #include <mach-o/dyld_priv.h>
@@ -147,9 +146,7 @@
             (void)vm_deallocate(mach_task_self(), (vm_address_t)localAddress, _size);
             return;
         }
-        remote_memory_audit_start();
         memcpy(_data, (void *)localAddress, _size);
-        remote_memory_audit_end();
         (void)vm_deallocate(mach_task_self(), (vm_address_t)localAddress, _size);
     }
     RemoteMap(const RemoteMap&) = delete;
@@ -288,9 +285,8 @@
         if (!mf) {
             continue;
         }
-        uint32_t headerSize = mf->headerAndLoadCommandsSize();
-        if (headerSize > PAGE_SIZE) {
-            size_t newSize =  (size_t)lsl::roundToNextAligned(PAGE_SIZE, headerSize);
+        if (mf->machHeaderSize() > PAGE_SIZE) {
+            size_t newSize =  (size_t)lsl::roundToNextAligned(PAGE_SIZE, mf->machHeaderSize());
             auto newMap = RemoteMap(task, address, newSize);
             map = std::move(newMap);
             if (!map) {