[wasm] Correct guard region allocation behavior
Change-Id: I19106adfd5407cbef05142fde3b7eb00ecd8ff52 Reviewed-on: https://chromium-review.googlesource.com/1043256 Reviewed-by: Deepti Gandluri <gdeepti@chromium.org> Commit-Queue: Eric Holk <eholk@chromium.org> Cr-Commit-Position: refs/heads/master@{#53007}
This commit is contained in:
parent
bb60967e36
commit
72f6a76dd1
@ -279,11 +279,15 @@ MaybeHandle<JSArrayBuffer> NewArrayBuffer(Isolate* isolate, size_t size,
|
||||
memory = memory_tracker->GetEmptyBackingStore(
|
||||
&allocation_base, &allocation_length, isolate->heap());
|
||||
} else {
|
||||
bool require_full_guard_regions = trap_handler::IsTrapHandlerEnabled();
|
||||
#if V8_TARGET_ARCH_64_BIT
|
||||
bool require_full_guard_regions = true;
|
||||
#else
|
||||
bool require_full_guard_regions = false;
|
||||
#endif
|
||||
memory = TryAllocateBackingStore(memory_tracker, isolate->heap(), size,
|
||||
require_full_guard_regions,
|
||||
&allocation_base, &allocation_length);
|
||||
if (memory == nullptr && require_full_guard_regions) {
|
||||
if (memory == nullptr && !trap_handler::IsTrapHandlerEnabled()) {
|
||||
// If we failed to allocate with full guard regions, fall back on
|
||||
// mini-guards.
|
||||
require_full_guard_regions = false;
|
||||
|
Loading…
Reference in New Issue
Block a user