Commit e90a052e authored by Eric Holk's avatar Eric Holk Committed by Commit Bot

[wasm] Crash on out of memory under correctness fuzzer

Bug: chromium:828293
Change-Id: I37002c308738eef1366d82a90b7b29d6e44d6c48
Reviewed-on: https://chromium-review.googlesource.com/996585
Commit-Queue: Eric Holk <eholk@chromium.org>
Reviewed-by: 's avatarMichael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52405}
parent ceaf02d6
......@@ -43,6 +43,14 @@ void* TryAllocateBackingStore(WasmMemoryTracker* memory_tracker, Heap* heap,
// After first and second GC: retry.
if (trial < 2) continue;
// We are over the address space limit. Fail.
//
// When running under the correctness fuzzer (i.e.
// --abort-on-stack-or-string-length-overflow is preset), we crash instead
// so it is not incorrectly reported as a correctness violation. See
// https://crbug.com/828293#c4
if (FLAG_abort_on_stack_or_string_length_overflow) {
FATAL("could not allocate wasm memory");
}
return nullptr;
}
......
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