From 756ab1191eaea55b4e507c8a93c83bf2b4042f20 Mon Sep 17 00:00:00 2001 From: Eladash Date: Wed, 23 Aug 2023 08:19:49 +0300 Subject: [PATCH] PPU Analyzer: Fix for unaligned sections --- rpcs3/Emu/Cell/PPUAnalyser.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/rpcs3/Emu/Cell/PPUAnalyser.cpp b/rpcs3/Emu/Cell/PPUAnalyser.cpp index 2a774d0fd3..79ff56fb62 100644 --- a/rpcs3/Emu/Cell/PPUAnalyser.cpp +++ b/rpcs3/Emu/Cell/PPUAnalyser.cpp @@ -699,6 +699,11 @@ bool ppu_module::analyse(u32 lib_toc, u32 entry, const u32 sec_end, const std::b // Find OPD section for (const auto& sec : secs) { + if (sec.size % 8) + { + continue; + } + vm::cptr sec_end = vm::cast(sec.addr + sec.size); // Probe @@ -785,6 +790,11 @@ bool ppu_module::analyse(u32 lib_toc, u32 entry, const u32 sec_end, const std::b // Find .eh_frame section for (const auto& sec : secs) { + if (sec.size % 4) + { + continue; + } + vm::cptr sec_end = vm::cast(sec.addr + sec.size); // Probe