From 69af4a21ac57adc2b1bdd34b668b8acc57f3a21f Mon Sep 17 00:00:00 2001 From: "Dr. Chat" Date: Sat, 17 Nov 2018 11:04:25 -0600 Subject: [PATCH] [x64] Fill unwind reservation info bytes with 0xCC as well --- src/xenia/cpu/backend/x64/x64_code_cache.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/xenia/cpu/backend/x64/x64_code_cache.cc b/src/xenia/cpu/backend/x64/x64_code_cache.cc index ac05fe3e9..b258f2658 100644 --- a/src/xenia/cpu/backend/x64/x64_code_cache.cc +++ b/src/xenia/cpu/backend/x64/x64_code_cache.cc @@ -188,8 +188,9 @@ void* X64CodeCache::PlaceGuestCode(uint32_t guest_address, void* machine_code, std::memcpy(code_address, machine_code, code_size); // Fill unused slots with 0xCC - std::memset(code_address + code_size, 0xCC, - xe::round_up(code_size, 16) - code_size); + std::memset( + code_address + code_size, 0xCC, + xe::round_up(code_size + unwind_reservation.data_size, 16) - code_size); // Notify subclasses of placed code. PlaceCode(guest_address, machine_code, code_size, stack_size, code_address,