[PR #928] [MERGED] semaphore: Fix semaphore wait list leaking #1833

Closed
opened 2026-02-27 21:14:08 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/shadps4-emu/shadPS4/pull/928
Author: @raphaelthegreat
Created: 9/15/2024
Status: Merged
Merged: 9/15/2024
Merged by: @raphaelthegreat

Base: mainHead: leak-fix


📝 Commits (1)

  • 12e7f1a semaphore: Fix semaphore wait list leaking

📊 Changes

1 file changed (+12 additions, -5 deletions)

View changed files

📝 src/core/libraries/kernel/threads/semaphore.cpp (+12 -5)

📄 Description

When a semaphore wait timed out we did not remove the thread from the wait list. This means the list could fill with garbage entries over time. May fix memory leaks in games that use orbis semaphores a lot like Bloodborne and The Last Guardian


🔄 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/928 **Author:** [@raphaelthegreat](https://github.com/raphaelthegreat) **Created:** 9/15/2024 **Status:** ✅ Merged **Merged:** 9/15/2024 **Merged by:** [@raphaelthegreat](https://github.com/raphaelthegreat) **Base:** `main` ← **Head:** `leak-fix` --- ### 📝 Commits (1) - [`12e7f1a`](https://github.com/shadps4-emu/shadPS4/commit/12e7f1a78f170410d2db054e9a4c3e64bba7e5e9) semaphore: Fix semaphore wait list leaking ### 📊 Changes **1 file changed** (+12 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `src/core/libraries/kernel/threads/semaphore.cpp` (+12 -5) </details> ### 📄 Description When a semaphore wait timed out we did not remove the thread from the wait list. This means the list could fill with garbage entries over time. May fix memory leaks in games that use orbis semaphores a lot like Bloodborne and The Last Guardian --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 21:14:08 +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#1833
No description provided.