summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar bunnei2018-02-02 08:59:45 -0800
committerGravatar GitHub2018-02-02 08:59:45 -0800
commit2e6776909b6487280266f34ecd4bb33e2458760e (patch)
tree85fc8ced6cc673f57a8c410e791e026d06be44dd /src
parent[WIP] sfdnsres: stub (#146) (diff)
parentshared_memory: Only mark addresses as invalid if they are within the heap (diff)
downloadyuzu-2e6776909b6487280266f34ecd4bb33e2458760e.tar.gz
yuzu-2e6776909b6487280266f34ecd4bb33e2458760e.tar.xz
yuzu-2e6776909b6487280266f34ecd4bb33e2458760e.zip
Merge pull request #152 from shinyquagsire23/sharedmem-valid-bounds
shared_memory: Only mark addresses as invalid if they are within the heap
Diffstat (limited to 'src')
-rw-r--r--src/core/hle/kernel/shared_memory.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/core/hle/kernel/shared_memory.cpp b/src/core/hle/kernel/shared_memory.cpp
index 7279366ec..f8aa429dc 100644
--- a/src/core/hle/kernel/shared_memory.cpp
+++ b/src/core/hle/kernel/shared_memory.cpp
@@ -136,7 +136,8 @@ ResultCode SharedMemory::Map(Process* target_process, VAddr address, MemoryPermi
136 // can not map it in its own address space unless it was created with addr=0, result 0xD900182C. 136 // can not map it in its own address space unless it was created with addr=0, result 0xD900182C.
137 137
138 if (address != 0) { 138 if (address != 0) {
139 if (address < Memory::HEAP_VADDR) { 139 // TODO(shinyquagsire23): Check for virtual/mappable memory here too?
140 if (address >= Memory::HEAP_VADDR && address < Memory::HEAP_VADDR_END) {
140 LOG_ERROR(Kernel, "cannot map id=%u, address=0x%llx name=%s, invalid address", 141 LOG_ERROR(Kernel, "cannot map id=%u, address=0x%llx name=%s, invalid address",
141 GetObjectId(), address, name.c_str()); 142 GetObjectId(), address, name.c_str());
142 return ERR_INVALID_ADDRESS; 143 return ERR_INVALID_ADDRESS;