mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2026-04-26 16:25:58 +03:00
[PR #3978] [MERGED] Kernel.Vmm: Fix potential race condition involving concurrent Allocate and Free calls #3840
Labels
No labels
Bloodborne
bug
contributor wanted
documentation
enhancement
frontend
good first issue
help wanted
linux
pull-request
question
release
verification progress
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/shadPS4#3840
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/shadps4-emu/shadPS4/pull/3978
Author: @StevenMiller123
Created: 1/30/2026
Status: ✅ Merged
Merged: 1/30/2026
Merged by: @georgemoralis
Base:
main← Head:mem-fix-payday2📝 Commits (2)
66e2c4dAvoid nullptr dereference on GetSocket875dc0bLock unmap mutex in PoolExpand and Allocate📊 Changes
2 files changed (+5 additions, -2 deletions)
View changed files
📝
src/core/file_sys/fs.cpp(+3 -0)📝
src/core/memory.cpp(+2 -2)📄 Description
PAYDAY 2 occasionally crashes from a memory assert during dmem Free calls.
This PR makes PoolExpand and Allocate lock the extra "unmap" mutex I added in #3956, which will ensure they don't modify the dmem map after Free searches for areas to unmap.
Not fully sure this fixes the issue, as I can't consistently reproduce this issue, but this is something I should've fixed in that PR in the first place. I'm surprised Unity games didn't reveal this 😅
Also snuck in a fix for sockets, HandleTable::GetSocket would crash if called with an invalid descriptor within the bounds of m_files. Came up while I was making my homebrew, but my socket PR got merged before I could push this fix there.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.