[PR #3142] [MERGED] Core: MapMemory fixes #3257

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

📋 Pull Request Information

Original PR: https://github.com/shadps4-emu/shadPS4/pull/3142
Author: @StevenMiller123
Created: 6/21/2025
Status: Merged
Merged: 6/22/2025
Merged by: @squidbus

Base: mainHead: memory-kalaposfos


📝 Commits (4)

📊 Changes

4 files changed (+189 additions, -172 deletions)

View changed files

📝 src/core/libraries/kernel/memory.cpp (+34 -35)
📝 src/core/libraries/kernel/memory.h (+29 -30)
📝 src/core/memory.cpp (+97 -77)
📝 src/core/memory.h (+29 -30)

📄 Description

This PR adds proper validation of the physical addresses inputted into MapMemory.
This fixes a bug reported by @kalaposfos13

I've also gone and updated all parameter and function types in our core memory code to use our defined types over int, size_t, and short for code cleanliness.

This PR effectively replaces #3113


🔄 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/3142 **Author:** [@StevenMiller123](https://github.com/StevenMiller123) **Created:** 6/21/2025 **Status:** ✅ Merged **Merged:** 6/22/2025 **Merged by:** [@squidbus](https://github.com/squidbus) **Base:** `main` ← **Head:** `memory-kalaposfos` --- ### 📝 Commits (4) - [`607bd59`](https://github.com/shadps4-emu/shadPS4/commit/607bd59a9cb78205e4b9d1013a9dbaa6899d07b5) Validate requested dmem range in MapMemory - [`7119228`](https://github.com/shadps4-emu/shadPS4/commit/71192289e2b09382818b6d21004a63a25ac50301) Specify type - [`0fce4f0`](https://github.com/shadps4-emu/shadPS4/commit/0fce4f00c5f41aff1c31304605263244e7f27b39) Types cleanup - [`0f48ba9`](https://github.com/shadps4-emu/shadPS4/commit/0f48ba93bd6cf6be6bdfdead11eaad3a2eab7773) Clang ### 📊 Changes **4 files changed** (+189 additions, -172 deletions) <details> <summary>View changed files</summary> 📝 `src/core/libraries/kernel/memory.cpp` (+34 -35) 📝 `src/core/libraries/kernel/memory.h` (+29 -30) 📝 `src/core/memory.cpp` (+97 -77) 📝 `src/core/memory.h` (+29 -30) </details> ### 📄 Description This PR adds proper validation of the physical addresses inputted into MapMemory. This fixes a bug reported by @kalaposfos13 I've also gone and updated all parameter and function types in our core memory code to use our defined types over int, size_t, and short for code cleanliness. This PR effectively replaces #3113 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 22:03:01 +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#3257
No description provided.