Commit 72f6a76d authored by Eric Holk's avatar Eric Holk Committed by Commit Bot

[wasm] Correct guard region allocation behavior

Change-Id: I19106adfd5407cbef05142fde3b7eb00ecd8ff52
Reviewed-on: https://chromium-review.googlesource.com/1043256Reviewed-by: 's avatarDeepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Eric Holk <eholk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53007}
parent bb60967e
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment