[PR #3113] [CLOSED] Core: Memory fixes <insert big Roman numeral here> #3233

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

📋 Pull Request Information

Original PR: https://github.com/shadps4-emu/shadPS4/pull/3113
Author: @kalaposfos13
Created: 6/17/2025
Status: Closed

Base: mainHead: memory-fixes-but-its-not-stephen


📝 Commits (1)

  • ccfb2b0 Return ENOMEM if len exceeds the available space in sceKernelMapNamedDirectMemory

📊 Changes

1 file changed (+4 additions, -0 deletions)

View changed files

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

📄 Description

Return ENOMEM if len exceeds the available space in sceKernelMapNamedDirectMemory.

This is based on a hardware test, courtesy of a plugin by @StevenMiller123. It fixes a discrepancy found in Driveclub if you use the CLI flag -increasedrenderplus, and with this PR, the console and the emulator now crash at the same place.

Klog:

<118>(../dmem/source/main.c:49) sceKernelMapDirectMemory called, in_addr = 2000000000, len = fffffffff8a00000, flags = 0, phys_addr = 0, align = 200000
<118>(../dmem/source/main.c:51) sceKernelMapDirectMemory called, out_addr = 2000000000, result = 8002000c

🔄 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/3113 **Author:** [@kalaposfos13](https://github.com/kalaposfos13) **Created:** 6/17/2025 **Status:** ❌ Closed **Base:** `main` ← **Head:** `memory-fixes-but-its-not-stephen` --- ### 📝 Commits (1) - [`ccfb2b0`](https://github.com/shadps4-emu/shadPS4/commit/ccfb2b03f72a852fc332bdb2cc01b77562fbb7cc) Return ENOMEM if len exceeds the available space in sceKernelMapNamedDirectMemory ### 📊 Changes **1 file changed** (+4 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `src/core/libraries/kernel/memory.cpp` (+4 -0) </details> ### 📄 Description Return ENOMEM if len exceeds the available space in sceKernelMapNamedDirectMemory. This is based on a hardware test, courtesy of a plugin by @StevenMiller123. It fixes a discrepancy found in Driveclub if you use the CLI flag `-increasedrenderplus`, and with this PR, the console and the emulator now crash at the same place. Klog: ``` <118>(../dmem/source/main.c:49) sceKernelMapDirectMemory called, in_addr = 2000000000, len = fffffffff8a00000, flags = 0, phys_addr = 0, align = 200000 <118>(../dmem/source/main.c:51) sceKernelMapDirectMemory called, out_addr = 2000000000, result = 8002000c ``` --- <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:56 +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#3233
No description provided.