Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] MemoryUtil: fix a couple of mmap fails #2515

Closed
wants to merge 2 commits into from

Conversation

Tilka
Copy link
Member

@Tilka Tilka commented Jun 4, 2015

  • Page-align the mmap hint because Valgrind requires it.
  • Fix a macro typo.
  • Cast size to signed to correct the upper bounds check.
  • Explain how to run Dolphin in GDB.

@Tilka Tilka force-pushed the mmap branch 2 times, most recently from 734849f to b6ac04e Compare June 4, 2015 03:23
@degasus
Copy link
Member

degasus commented Jun 4, 2015

RE gdb: Isn't just the hint wrong? It looks like the we get memory in random space instead of near our hint. Maybe with disabled randomization, we have to increase the offset a bit?

@Tilka Tilka changed the title MemoryUtil: fix mmap hint and macro typo MemoryUtil: fix a couple of mmap fails Jun 4, 2015
@@ -32,6 +33,8 @@ void* AllocateExecutableMemory(size_t size, void* map_hint)
#if defined(_WIN32)
void* ptr = VirtualAlloc(0, size, MEM_COMMIT, PAGE_EXECUTE_READWRITE);
#else
static long int page_mask = ~(sysconf(_SC_PAGE_SIZE) - 1);

This comment was marked as off-topic.

@Tilka Tilka changed the title MemoryUtil: fix a couple of mmap fails [WIP] MemoryUtil: fix a couple of mmap fails Jun 6, 2015
@Parlane Parlane added the WIP / do not merge Work in progress (do not merge) label Jun 8, 2015
@endrift endrift mentioned this pull request Jun 13, 2015
@Tilka
Copy link
Member Author

Tilka commented Aug 4, 2015

PIE was reverted, so this isn't needed.

@Tilka Tilka closed this Aug 4, 2015
@degasus
Copy link
Member

degasus commented Aug 4, 2015

But in the long term, we still want to have / need PIE...

@Tilka Tilka deleted the mmap branch August 4, 2015 09:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
WIP / do not merge Work in progress (do not merge)
4 participants