[PR #2394] [MERGED] Better bounds checks for sceKernelDlsym #2699

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

📋 Pull Request Information

Original PR: https://github.com/shadps4-emu/shadPS4/pull/2394
Author: @StevenMiller123
Created: 2/10/2025
Status: Merged
Merged: 2/10/2025
Merged by: @squidbus

Base: mainHead: unity-fixes


📝 Commits (1)

  • 61a1680 Better bounds checks for sceKernelDlsym

📊 Changes

2 files changed (+7 additions, -1 deletions)

View changed files

📝 src/core/libraries/kernel/process.cpp (+3 -0)
📝 src/core/linker.h (+4 -1)

📄 Description

Unity, being the awful game engine it is, checks for a return value of zero to determine if sceKernelLoadStartModule failed. This results in it throwing an error code into sceKernelDlsym's handle parameter when the module it's searching for doesn't exist in a game's files.

To solve this, I added proper bounds checks to Linker::GetModule, and relevant error handling in sceKernelDlsym.
This improves behavior in NEO : The World Ends with You (CUSA26376)


🔄 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/2394 **Author:** [@StevenMiller123](https://github.com/StevenMiller123) **Created:** 2/10/2025 **Status:** ✅ Merged **Merged:** 2/10/2025 **Merged by:** [@squidbus](https://github.com/squidbus) **Base:** `main` ← **Head:** `unity-fixes` --- ### 📝 Commits (1) - [`61a1680`](https://github.com/shadps4-emu/shadPS4/commit/61a168091ff264c0facdcb18b653eb2d358df8ea) Better bounds checks for sceKernelDlsym ### 📊 Changes **2 files changed** (+7 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `src/core/libraries/kernel/process.cpp` (+3 -0) 📝 `src/core/linker.h` (+4 -1) </details> ### 📄 Description Unity, being the awful game engine it is, checks for a return value of zero to determine if sceKernelLoadStartModule failed. This results in it throwing an error code into sceKernelDlsym's handle parameter when the module it's searching for doesn't exist in a game's files. To solve this, I added proper bounds checks to Linker::GetModule, and relevant error handling in sceKernelDlsym. This improves behavior in NEO : The World Ends with You (CUSA26376) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 22:00:54 +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#2699
No description provided.