Commit 66f5de1b authored by Clemens Backes's avatar Clemens Backes Committed by V8 LUCI CQ

[arm] Reset pending constant pool information on abortion

This avoids a DCHECK failure if we continue using the Assembler after
code generation abortion. Even though it might not be the best style to
still call methods on the Assembler after abortion, it's not a problem
apart from the firing DCHECK, so we apply this simple fix instead of
making sure to really abort everything immediately.

R=leszeks@chromium.org

Bug: chromium:1228720, chromium:1217074
Change-Id: Iac3a652f21e34534dd28fb1ab580ab2ee6df06dd
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3024157Reviewed-by: 's avatarLeszek Swirski <leszeks@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75716}
parent 905aafab
......@@ -555,7 +555,10 @@ Assembler::Assembler(const AssemblerOptions& options,
}
}
Assembler::~Assembler() { DCHECK_EQ(const_pool_blocked_nesting_, 0); }
Assembler::~Assembler() {
DCHECK_EQ(const_pool_blocked_nesting_, 0);
DCHECK_EQ(first_const_pool_32_use_, -1);
}
void Assembler::GetCode(Isolate* isolate, CodeDesc* desc,
SafepointTableBuilder* safepoint_table_builder,
......
......@@ -311,7 +311,10 @@ class V8_EXPORT_PRIVATE Assembler : public AssemblerBase {
~Assembler() override;
void AbortedCodeGeneration() override { pending_32_bit_constants_.clear(); }
void AbortedCodeGeneration() override {
pending_32_bit_constants_.clear();
first_const_pool_32_use_ = -1;
}
// GetCode emits any pending (non-emitted) code and fills the descriptor desc.
static constexpr int kNoHandlerTable = 0;
......
// Copyright 2021 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --wasm-staging
load('test/mjsunit/wasm/wasm-module-builder.js');
const builder = new WasmModuleBuilder();
builder.addFunction(undefined, kSig_v_v)
.addLocals(kWasmExternRef, 16268)
.addBody([kExprLoop, kWasmVoid, kExprEnd]);
builder.toModule();
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