From 339339e2660014ece36608cf029fdbc059bf3e01 Mon Sep 17 00:00:00 2001 From: WeiN76LQh Date: Thu, 21 Nov 2024 14:20:04 +0000 Subject: [SharedCache] Fix padding issue with v5 slide info The issue this commit fixes was causing `SharedCache::ParseAndApplySlideInfoForFile` to completely fail to work with v5 slide info, which had a lot of knock on effects, i.e. lots of Objective-C analysis was failing due to invalid pointers which hadn't been fixed up. `dyld_cache_slide_info5` has 4 bytes of padding before `value_add`. Whilst `value_add` is not actually being read from, `SharedCache::ParseAndApplySlideInfoForFile` will read at a location in the file based on the size of the structure `dyld_cache_slide_info5`. This being off by 4 bytes basically broke v5 slide info fixups. With this fix many more Objective-C functions have names and a lot more `msgSend` calls are fixed up. --- view/sharedcache/core/SharedCache.h | 1 + 1 file changed, 1 insertion(+) (limited to 'view/sharedcache') diff --git a/view/sharedcache/core/SharedCache.h b/view/sharedcache/core/SharedCache.h index ac24b529..ae8e5e60 100644 --- a/view/sharedcache/core/SharedCache.h +++ b/view/sharedcache/core/SharedCache.h @@ -202,6 +202,7 @@ namespace SharedCacheCore { uint32_t version; // currently 5 uint32_t page_size; // currently 4096 (may also be 16384) uint32_t page_starts_count; + uint32_t pad; // padding to ensure the value below is on an 8-byte boundary uint64_t value_add; // uint16_t page_starts[/* page_starts_count */]; }; -- cgit v1.3.1