Commit f7f850cb authored by Jakob Gruber's avatar Jakob Gruber Committed by Commit Bot

[nojit] Expose wasm in jitless mode for correctness fuzzers

Correctness fuzzers need the global object to have a consistent shape
across build configs.

Bug: chromium:932877,chromium:932656,v8:7777
Change-Id: Id4e1251e50965b822bc4ef36c5ae2777864273d5
Reviewed-on: https://chromium-review.googlesource.com/c/1475768Reviewed-by: 's avatarMichael Starzinger <mstarzinger@chromium.org>
Reviewed-by: 's avatarMichael Achenbach <machenbach@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59654}
parent e7d414a2
......@@ -1052,6 +1052,7 @@ DEFINE_BOOL(stack_trace_on_illegal, false,
"print stack trace when an illegal exception is thrown")
DEFINE_BOOL(abort_on_uncaught_exception, false,
"abort program (dump core) when an uncaught exception is thrown")
// TODO(jgruber,machenbach): Rename to --correctness-fuzzer-suppressions.
DEFINE_BOOL(abort_on_stack_or_string_length_overflow, false,
"Abort program when the stack overflows or a string exceeds "
"maximum length (as opposed to throwing RangeError). This is "
......@@ -1178,10 +1179,7 @@ DEFINE_NEG_IMPLICATION(jitless, validate_asm)
DEFINE_IMPLICATION(jitless, wasm_interpret_all)
DEFINE_NEG_IMPLICATION(jitless, asm_wasm_lazy_compilation)
DEFINE_NEG_IMPLICATION(jitless, wasm_lazy_compilation)
// Even in interpreter-only mode, wasm currently still creates executable
// memory at runtime. Disable until this changes.
// TODO(jgruber): Remove this once / if wasm can run without executable memory.
DEFINE_NEG_IMPLICATION(jitless, expose_wasm)
// --jitless also implies --no-expose-wasm, see InitializeOncePerProcessImpl.
// Enable recompilation of function with optimized code.
DEFINE_BOOL(opt, !V8_LITE_BOOL, "use adaptive optimizations")
......
......@@ -78,6 +78,20 @@ void V8::InitializeOncePerProcessImpl() {
std::ios_base::trunc);
}
// Do not expose wasm in jitless mode.
//
// Even in interpreter-only mode, wasm currently still creates executable
// memory at runtime. Unexpose wasm until this changes.
// The correctness fuzzers are a special case: many of their test cases are
// built by fetching a random property from the the global object, and thus
// the global object layout must not change between configs. That is why we
// continue exposing wasm on correctness fuzzers even in jitless mode.
// TODO(jgruber): Remove this once / if wasm can run without executable
// memory.
if (FLAG_jitless && !FLAG_abort_on_stack_or_string_length_overflow) {
FLAG_expose_wasm = false;
}
base::OS::Initialize(FLAG_hard_abort, FLAG_gc_fake_mmap);
if (FLAG_random_seed) SetRandomMmapSeed(FLAG_random_seed);
......
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