Revert "[wasm] Enable guards on 64-bit systems."
Web platform tests that allocate 600 memories fail due to this. (This seems to also interfere with tests on the same shard).
This reverts commit b9abc7f005
.
Reason for revert: <INSERT REASONING HERE>
Original change's description:
> [wasm] Enable guards on 64-bit systems.
>
> R=eholk@chromium.org
>
> Bug:
> Change-Id: Ia099cf085510da50a87b9f999020d6a66d6eab20
> Reviewed-on: https://chromium-review.googlesource.com/838250
> Commit-Queue: Brad Nelson <bradnelson@chromium.org>
> Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
> Reviewed-by: Eric Holk <eholk@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#50300}
TBR=bradnelson@chromium.org,eholk@chromium.org,clemensh@chromium.org
Change-Id: Ie7fc2a2142bddb03df41a5b705087a2e1f03e163
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/842925
Reviewed-by: Brad Nelson <bradnelson@chromium.org>
Commit-Queue: Brad Nelson <bradnelson@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50304}
This commit is contained in:
parent
29bb707e9b
commit
8e33a405f6
@ -3174,14 +3174,7 @@ Handle<JSArrayBuffer> InstanceBuilder::AllocateMemory(uint32_t num_pages) {
|
||||
thrower_->RangeError("Out of memory: wasm memory too large");
|
||||
return Handle<JSArrayBuffer>::null();
|
||||
}
|
||||
#if V8_TARGET_ARCH_64_BIT && !defined(THREAD_SANITIZER) && \
|
||||
!defined(LEAK_SANITIZER) && !defined(V8_USE_ADDRESS_SANITIZER)
|
||||
// TODO(eholk): Enable sanitizers once we have back-pressure.
|
||||
// Always turn on guard regions in 64-bit.
|
||||
const bool enable_guard_regions = true;
|
||||
#else
|
||||
const bool enable_guard_regions = use_trap_handler();
|
||||
#endif
|
||||
const bool is_shared_memory =
|
||||
module_->has_shared_memory && i::FLAG_experimental_wasm_threads;
|
||||
Handle<JSArrayBuffer> mem_buffer = NewArrayBuffer(
|
||||
|
@ -600,15 +600,8 @@ void WebAssemblyMemory(const v8::FunctionCallbackInfo<v8::Value>& args) {
|
||||
|
||||
size_t size = static_cast<size_t>(i::wasm::WasmModule::kPageSize) *
|
||||
static_cast<size_t>(initial);
|
||||
#if V8_TARGET_ARCH_64_BIT && !defined(THREAD_SANITIZER) && \
|
||||
!defined(LEAK_SANITIZER) && !defined(V8_USE_ADDRESS_SANITIZER)
|
||||
// TODO(eholk): Enable sanitizers once we have back-pressure.
|
||||
// Always turn on guard regions in 64-bit.
|
||||
const bool enable_guard_regions = true;
|
||||
#else
|
||||
const bool enable_guard_regions =
|
||||
internal::trap_handler::IsTrapHandlerEnabled();
|
||||
#endif
|
||||
i::Handle<i::JSArrayBuffer> buffer = i::wasm::NewArrayBuffer(
|
||||
i_isolate, size, enable_guard_regions,
|
||||
is_shared_memory ? i::SharedFlag::kShared : i::SharedFlag::kNotShared);
|
||||
|
@ -369,17 +369,8 @@ Handle<JSArrayBuffer> GrowMemoryBuffer(Isolate* isolate,
|
||||
if (old_pages > maximum_pages || pages > maximum_pages - old_pages) {
|
||||
return Handle<JSArrayBuffer>::null();
|
||||
}
|
||||
#if V8_TARGET_ARCH_64_BIT && !defined(THREAD_SANITIZER) && \
|
||||
!defined(LEAK_SANITIZER) && !defined(V8_USE_ADDRESS_SANITIZER)
|
||||
// TODO(eholk): Enable sanitizers once we have back-pressure.
|
||||
// Always turn on guard regions in 64-bit.
|
||||
// But allow for previously unguarded memory for some cctests.
|
||||
const bool enable_guard_regions =
|
||||
old_buffer.is_null() ? true : old_buffer->has_guard_region();
|
||||
#else
|
||||
const bool enable_guard_regions =
|
||||
old_buffer.is_null() ? use_trap_handler : old_buffer->has_guard_region();
|
||||
#endif
|
||||
size_t new_size =
|
||||
static_cast<size_t>(old_pages + pages) * WasmModule::kPageSize;
|
||||
if (new_size > FLAG_wasm_max_mem_pages * WasmModule::kPageSize ||
|
||||
|
Loading…
Reference in New Issue
Block a user