зеркало из https://github.com/mozilla/pjs.git
Bug 728623: disable jitcode address randomization on Win64, r=dvander
This commit is contained in:
Родитель
37fcdc194c
Коммит
d67fb2efbc
|
@ -103,11 +103,15 @@ RandomizeIsBroken()
|
|||
ExecutablePool::Allocation ExecutableAllocator::systemAlloc(size_t n)
|
||||
{
|
||||
void *allocation = NULL;
|
||||
// Randomization disabled to avoid a performance fault on x64 builds.
|
||||
// See bug 728623.
|
||||
#ifndef JS_CPU_X64
|
||||
if (allocBehavior == AllocationCanRandomize && !RandomizeIsBroken()) {
|
||||
void *randomAddress = computeRandomAllocationAddress();
|
||||
allocation = VirtualAlloc(randomAddress, n, MEM_COMMIT | MEM_RESERVE,
|
||||
PAGE_EXECUTE_READWRITE);
|
||||
}
|
||||
#endif
|
||||
if (!allocation)
|
||||
allocation = VirtualAlloc(0, n, MEM_COMMIT | MEM_RESERVE, PAGE_EXECUTE_READWRITE);
|
||||
ExecutablePool::Allocation alloc = { reinterpret_cast<char*>(allocation), n };
|
||||
|
|
Загрузка…
Ссылка в новой задаче