[PR #3637] [CLOSED] Fix/memory mapping high addresses #3626

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

📋 Pull Request Information

Original PR: https://github.com/shadps4-emu/shadPS4/pull/3637
Author: @ADEMOLA200
Created: 9/21/2025
Status: Closed

Base: mainHead: fix/memory-mapping-high-addresses


📝 Commits (4)

📊 Changes

39 files changed (+228 additions, -71 deletions)

View changed files

📝 src/common/config.cpp (+7 -0)
📝 src/common/config.h (+1 -0)
📝 src/core/address_space.cpp (+1 -1)
📝 src/core/aerolib/stubs.cpp (+2 -2)
📝 src/core/file_sys/devices/logger.cpp (+2 -2)
📝 src/core/libraries/ajm/ajm_at9.cpp (+18 -3)
📝 src/core/libraries/ajm/ajm_instance.cpp (+0 -5)
📝 src/core/libraries/ajm/ajm_instance.h (+0 -1)
📝 src/core/libraries/ajm/ajm_mp3.cpp (+2 -2)
📝 src/core/libraries/audio/audioin.cpp (+1 -1)
📝 src/core/libraries/audio3d/audio3d.cpp (+1 -1)
📝 src/core/libraries/kernel/memory.cpp (+6 -6)
📝 src/core/libraries/network/http.cpp (+1 -1)
📝 src/core/libraries/network/net.cpp (+2 -2)
📝 src/core/libraries/network/p2p_sockets.cpp (+1 -1)
📝 src/core/libraries/network/sys_net.cpp (+1 -1)
📝 src/core/libraries/np/np_party.cpp (+1 -1)
📝 src/core/libraries/pad/pad.cpp (+3 -3)
📝 src/core/libraries/playgo/playgo.cpp (+3 -3)
📝 src/core/libraries/system/sysmodule.cpp (+1 -1)

...and 19 more files

📄 Description

Fix memory mapping for high address requests

This commit resolves the "Virtual address not in vm_map" assertion failure
that occurred when applications request memory at high virtual addresses.

Changes:

  1. Replaced ASSERT_MSG with proper error handling in SearchFree() to
    gracefully handle addresses beyond the expected range
  2. Fixed IsValidAddress() to properly validate against all memory regions
    instead of just the VMA map
  3. Added comprehensive logging for better debugging

The fixes ensure that high memory address requests are handled correctly
without crashing the emulator, allowing applications that use these
addresses to run properly.


🔄 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/3637 **Author:** [@ADEMOLA200](https://github.com/ADEMOLA200) **Created:** 9/21/2025 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/memory-mapping-high-addresses` --- ### 📝 Commits (4) - [`a5aedb1`](https://github.com/shadps4-emu/shadPS4/commit/a5aedb14d709814ce9a6a3e7228120479a72d8f1) Silent some log spam - [`88347d8`](https://github.com/shadps4-emu/shadPS4/commit/88347d869b32c4f921cedbafa51d27cde500dfa2) pr3096 - [`d1f4577`](https://github.com/shadps4-emu/shadPS4/commit/d1f45777c2a7173610a21bdbea5c89cb16173447) Hacks - [`09c815d`](https://github.com/shadps4-emu/shadPS4/commit/09c815d83944f74f84dcf1116bb2fc78c0e1a8e5) Fix memory mapping assertion for high virtual address requests ### 📊 Changes **39 files changed** (+228 additions, -71 deletions) <details> <summary>View changed files</summary> 📝 `src/common/config.cpp` (+7 -0) 📝 `src/common/config.h` (+1 -0) 📝 `src/core/address_space.cpp` (+1 -1) 📝 `src/core/aerolib/stubs.cpp` (+2 -2) 📝 `src/core/file_sys/devices/logger.cpp` (+2 -2) 📝 `src/core/libraries/ajm/ajm_at9.cpp` (+18 -3) 📝 `src/core/libraries/ajm/ajm_instance.cpp` (+0 -5) 📝 `src/core/libraries/ajm/ajm_instance.h` (+0 -1) 📝 `src/core/libraries/ajm/ajm_mp3.cpp` (+2 -2) 📝 `src/core/libraries/audio/audioin.cpp` (+1 -1) 📝 `src/core/libraries/audio3d/audio3d.cpp` (+1 -1) 📝 `src/core/libraries/kernel/memory.cpp` (+6 -6) 📝 `src/core/libraries/network/http.cpp` (+1 -1) 📝 `src/core/libraries/network/net.cpp` (+2 -2) 📝 `src/core/libraries/network/p2p_sockets.cpp` (+1 -1) 📝 `src/core/libraries/network/sys_net.cpp` (+1 -1) 📝 `src/core/libraries/np/np_party.cpp` (+1 -1) 📝 `src/core/libraries/pad/pad.cpp` (+3 -3) 📝 `src/core/libraries/playgo/playgo.cpp` (+3 -3) 📝 `src/core/libraries/system/sysmodule.cpp` (+1 -1) _...and 19 more files_ </details> ### 📄 Description Fix memory mapping for high address requests This commit resolves the "Virtual address not in vm_map" assertion failure that occurred when applications request memory at high virtual addresses. Changes: 1. Replaced ASSERT_MSG with proper error handling in SearchFree() to gracefully handle addresses beyond the expected range 2. Fixed IsValidAddress() to properly validate against all memory regions instead of just the VMA map 3. Added comprehensive logging for better debugging The fixes ensure that high memory address requests are handled correctly without crashing the emulator, allowing applications that use these addresses to run properly. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 22:04:24 +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#3626
No description provided.