[Compile] Mark SFI as asm_wasm_broken if AsmWasm parsing fails
Previously we only used this flag if asm_wasm instantiation failed, but we should avoid trying asm_wasm again if we failed during the initial parse/compile, in case we have to recompile due to bytecode flushing. This also avoids issues if there is a tranisent reason we fail asm_wasm compilation (e.g., stack overflow) and later recompilations succeed and cause inconsistencies like in the linked bug. BUG=chromium:991133 Change-Id: Id156efa9d8625ce3db2058cb279ea23aeb66052f Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1751784 Reviewed-by: Michael Starzinger <mstarzinger@chromium.org> Commit-Queue: Ross McIlroy <rmcilroy@chromium.org> Cr-Commit-Position: refs/heads/master@{#63192}
This commit is contained in:
parent
475019f299
commit
1687c0486b
@ -410,6 +410,12 @@ void InstallUnoptimizedCode(UnoptimizedCompilationInfo* compilation_info,
|
||||
DCHECK(!compilation_info->has_asm_wasm_data());
|
||||
DCHECK(!shared_info->HasFeedbackMetadata());
|
||||
|
||||
// If the function failed asm-wasm compilation, mark asm_wasm as broken
|
||||
// to ensure we don't try to compile as asm-wasm.
|
||||
if (compilation_info->literal()->scope()->IsAsmModule()) {
|
||||
shared_info->set_is_asm_wasm_broken(true);
|
||||
}
|
||||
|
||||
InstallBytecodeArray(compilation_info->bytecode_array(), shared_info,
|
||||
parse_info, isolate);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user