mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2026-04-27 00:36:00 +03:00
[PR #3757] [MERGED] Core: Read-only file mmap fix #3699
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#3699
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/3757
Author: @StevenMiller123
Created: 10/30/2025
Status: ✅ Merged
Merged: 10/30/2025
Merged by: @squidbus
Base:
main← Head:file-mmap-hotfix📝 Commits (2)
05b5822Extra validity checks for file mmaps34e2001Add comment📊 Changes
1 file changed (+14 additions, -0 deletions)
View changed files
📝
src/core/memory.cpp(+14 -0)📄 Description
PS4s allow read-only file mmaps with read-write permissions, though attempting to write to that memory causes full system crashes and data corruption. On shadPS4, attempting to do this causes an address space assert, through either a failed mmap on Linux, or a failed MapViewOfFile3 call on Windows.
This PR fixes the address space errors by removing write permissions on mmap for read-only files.
This should fix a regression noted on Discord, and slightly improves the behavior of my memory testing suite on shadPS4.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.