[PR #729] [MERGED] Fix VirtualQuery #1737

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

📋 Pull Request Information

Original PR: https://github.com/shadps4-emu/shadPS4/pull/729
Author: @StevenMiller123
Created: 9/2/2024
Status: Merged
Merged: 9/2/2024
Merged by: @georgemoralis

Base: mainHead: VirtualQuery-Fixes


📝 Commits (1)

📊 Changes

1 file changed (+2 additions, -1 deletions)

View changed files

📝 src/core/memory.cpp (+2 -1)

📄 Description

Found this issue while looking at code from fpPS4. shadPS4's VirtualQuery implementation was setting info->is_commited to true (to be specific, the u32 equivalent) when the queried region was reserved. As far as I know, reserved regions are not committed, so incorrectly setting this causes issues.

Also sets the protection value in the VirtualQueryInfo, as I'd assume not storing that could cause issues in games (especially when functions that protect memory are implemented).

This fixes Unity games currently hanging on the sceKernelMprotect stub.


🔄 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/729 **Author:** [@StevenMiller123](https://github.com/StevenMiller123) **Created:** 9/2/2024 **Status:** ✅ Merged **Merged:** 9/2/2024 **Merged by:** [@georgemoralis](https://github.com/georgemoralis) **Base:** `main` ← **Head:** `VirtualQuery-Fixes` --- ### 📝 Commits (1) - [`f3a6289`](https://github.com/shadps4-emu/shadPS4/commit/f3a62891ed83b6c1beb306eda4af57fc819b225e) Fix VirtualQuery ### 📊 Changes **1 file changed** (+2 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `src/core/memory.cpp` (+2 -1) </details> ### 📄 Description Found this issue while looking at code from fpPS4. shadPS4's VirtualQuery implementation was setting info->is_commited to true (to be specific, the u32 equivalent) when the queried region was reserved. As far as I know, reserved regions are not committed, so incorrectly setting this causes issues. Also sets the protection value in the VirtualQueryInfo, as I'd assume not storing that could cause issues in games (especially when functions that protect memory are implemented). This fixes Unity games currently hanging on the sceKernelMprotect stub. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 21:13:46 +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#1737
No description provided.