Skip to content
Snippets Groups Projects
Unverified Commit 2e677690 authored by bunnei's avatar bunnei Committed by GitHub
Browse files

Merge pull request #152 from shinyquagsire23/sharedmem-valid-bounds

shared_memory: Only mark addresses as invalid if they are within the heap
parents eaa9f968 96c444d1
No related branches found
No related tags found
No related merge requests found
...@@ -136,7 +136,8 @@ ResultCode SharedMemory::Map(Process* target_process, VAddr address, MemoryPermi ...@@ -136,7 +136,8 @@ ResultCode SharedMemory::Map(Process* target_process, VAddr address, MemoryPermi
// can not map it in its own address space unless it was created with addr=0, result 0xD900182C. // can not map it in its own address space unless it was created with addr=0, result 0xD900182C.
if (address != 0) { if (address != 0) {
if (address < Memory::HEAP_VADDR) { // TODO(shinyquagsire23): Check for virtual/mappable memory here too?
if (address >= Memory::HEAP_VADDR && address < Memory::HEAP_VADDR_END) {
LOG_ERROR(Kernel, "cannot map id=%u, address=0x%llx name=%s, invalid address", LOG_ERROR(Kernel, "cannot map id=%u, address=0x%llx name=%s, invalid address",
GetObjectId(), address, name.c_str()); GetObjectId(), address, name.c_str());
return ERR_INVALID_ADDRESS; return ERR_INVALID_ADDRESS;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment