From 273df17d8e21f2317653bc98fb3fb46d00344de0 Mon Sep 17 00:00:00 2001 From: Jakob Gruber Date: Wed, 11 Nov 2020 13:31:04 +0100 Subject: [PATCH] [nci] Check Isolate::concurrent_recompilation_enabled ... instead of FLAG_concurrent_recompilation. The optimizing_compile_dispatcher may be nullptr despite the flag being set. Bug: v8:8888,chromium:1145988 Change-Id: Ia3a6b1a95dde2b8cdd43dd2beebf04c66f145f78 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2531781 Commit-Queue: Jakob Gruber Commit-Queue: Maya Lekova Auto-Submit: Jakob Gruber Reviewed-by: Maya Lekova Cr-Commit-Position: refs/heads/master@{#71116} --- src/runtime/runtime-compiler.cc | 2 +- test/mjsunit/regress/regress-1145988.js | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 test/mjsunit/regress/regress-1145988.js diff --git a/src/runtime/runtime-compiler.cc b/src/runtime/runtime-compiler.cc index 898279cdb6..5eb07e1f24 100644 --- a/src/runtime/runtime-compiler.cc +++ b/src/runtime/runtime-compiler.cc @@ -311,7 +311,7 @@ RUNTIME_FUNCTION(Runtime_CompileForOnStackReplacement) { // Possibly compile for NCI caching. if (!MaybeSpawnNativeContextIndependentCompilationJob( - function, FLAG_concurrent_recompilation + function, isolate->concurrent_recompilation_enabled() ? ConcurrencyMode::kConcurrent : ConcurrencyMode::kNotConcurrent)) { return Object(); diff --git a/test/mjsunit/regress/regress-1145988.js b/test/mjsunit/regress/regress-1145988.js new file mode 100644 index 0000000000..4a7dac2c3b --- /dev/null +++ b/test/mjsunit/regress/regress-1145988.js @@ -0,0 +1,10 @@ +// Copyright 2020 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. + +__f_1(); +function __f_1() { + for (var __v_3 = 0; __v_3 < 100000; __v_3++) { + } +} +__f_1();