[PR #3029] [MERGED] Core: Protect fixes #3160

Closed
opened 2026-02-27 22:02:40 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/shadps4-emu/shadPS4/pull/3029
Author: @StevenMiller123
Created: 6/3/2025
Status: Merged
Merged: 6/3/2025
Merged by: @georgemoralis

Base: mainHead: protect-fix


📝 Commits (3)

  • 5307e9d Swap do-while to while
  • 49d1486 Move prot validation outside loop
  • ad3a0ad Add logging for protect calls

📊 Changes

2 files changed (+21 additions, -15 deletions)

View changed files

📝 src/core/libraries/kernel/memory.cpp (+4 -0)
📝 src/core/memory.cpp (+17 -15)

📄 Description

This PR makes slight adjustments to our sceKernelMprotect and sceKernelMtypeprotect implementations, by refactoring the code for better readability, properly handling calls with size = 0, and logging additional information for debugging purposes.

This fixes a memory assert seen in updated versions of RESIDENT EVIL 2 (CUSA09193).


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/shadps4-emu/shadPS4/pull/3029 **Author:** [@StevenMiller123](https://github.com/StevenMiller123) **Created:** 6/3/2025 **Status:** ✅ Merged **Merged:** 6/3/2025 **Merged by:** [@georgemoralis](https://github.com/georgemoralis) **Base:** `main` ← **Head:** `protect-fix` --- ### 📝 Commits (3) - [`5307e9d`](https://github.com/shadps4-emu/shadPS4/commit/5307e9d913b12a5aa3691f244914b176cc88d52d) Swap do-while to while - [`49d1486`](https://github.com/shadps4-emu/shadPS4/commit/49d1486d261c56b80a81db757ac19f7c86fddccc) Move prot validation outside loop - [`ad3a0ad`](https://github.com/shadps4-emu/shadPS4/commit/ad3a0ad466097da9095bee72b0371e762100f79e) Add logging for protect calls ### 📊 Changes **2 files changed** (+21 additions, -15 deletions) <details> <summary>View changed files</summary> 📝 `src/core/libraries/kernel/memory.cpp` (+4 -0) 📝 `src/core/memory.cpp` (+17 -15) </details> ### 📄 Description This PR makes slight adjustments to our `sceKernelMprotect` and `sceKernelMtypeprotect` implementations, by refactoring the code for better readability, properly handling calls with size = 0, and logging additional information for debugging purposes. This fixes a memory assert seen in updated versions of RESIDENT EVIL 2 (CUSA09193). --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 22:02:40 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/shadPS4#3160
No description provided.