From 9f7cbe9b4e226978a916f10404df4dc1d2a3c003 Mon Sep 17 00:00:00 2001 From: Emanuel Ziegler Date: Tue, 1 Feb 2022 18:56:31 +0100 Subject: [PATCH] Add regression test for http://crbug/1206289 Bug: chromium:1206289 Change-Id: Ib0cc2a0d159b763efa4fe33502b0a6562973b430 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3429501 Reviewed-by: Lutz Vahl Commit-Queue: Lutz Vahl Cr-Commit-Position: refs/heads/main@{#78899} --- test/mjsunit/regress/regress-crbug-1206289.js | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 test/mjsunit/regress/regress-crbug-1206289.js diff --git a/test/mjsunit/regress/regress-crbug-1206289.js b/test/mjsunit/regress/regress-crbug-1206289.js new file mode 100644 index 0000000000..fe06bb18b6 --- /dev/null +++ b/test/mjsunit/regress/regress-crbug-1206289.js @@ -0,0 +1,22 @@ +// 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: --expose-gc --stress-flush-bytecode + +function outer() { + function asm_broken(a, import_obj) { + "use asm"; + // import_obj is expected to be an object and this causes + // asm_wasm_broken to be set to true when instantiating at runtime. + var v = import_obj.x; + function inner() { + } + return inner; + } + var m = asm_broken(); +} + +assertThrows(outer); +gc(); +assertThrows(outer);