From faf8ada719edd7a29f96f2cb282186a178cdb811 Mon Sep 17 00:00:00 2001 From: Richard Lau Date: Fri, 3 May 2024 14:30:02 +0100 Subject: [PATCH] deps: V8: cherry-pick f6bef09b3b0a MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Original commit message: [turboshaft] initialize constant_value_ to an empty value gcc-10 seems to have a bug were not initializing this value throws this compilation error: ``` src/compiler/turboshaft/assembler.h:680:16: error: ‘’ is used uninitialized in this function [-Werror=uninitialized] 680 | return Get(); ``` https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86465 Bug: v8:12783 Change-Id: I7a5fee5009b866a801326fba734c156c3cfdb1b0 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5503350 Reviewed-by: Nico Hartmann Commit-Queue: Milad Farazmand Cr-Commit-Position: refs/heads/main@{#93675} Refs: https://github.com/v8/v8/commit/f6bef09b3b0a4aedaa59ff86a33c9f1d7427357b PR-URL: https://github.com/nodejs/node/pull/52802 Fixes: https://github.com/nodejs/node/issues/52661 Reviewed-By: Michaël Zasso Reviewed-By: Mohammed Keyvanzadeh Reviewed-By: Marco Ippolito Reviewed-By: Yagiz Nizipli --- common.gypi | 2 +- deps/v8/src/compiler/turboshaft/index.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/common.gypi b/common.gypi index da9076c0044e21..d6f024ab93a365 100644 --- a/common.gypi +++ b/common.gypi @@ -37,7 +37,7 @@ # Reset this number to 0 on major V8 upgrades. # Increment by one for each non-official patch applied to deps/v8. - 'v8_embedder_string': '-node.11', + 'v8_embedder_string': '-node.12', ##### V8 defaults for Node.js ##### diff --git a/deps/v8/src/compiler/turboshaft/index.h b/deps/v8/src/compiler/turboshaft/index.h index 86fdab72b769c4..83f85c954273c2 100644 --- a/deps/v8/src/compiler/turboshaft/index.h +++ b/deps/v8/src/compiler/turboshaft/index.h @@ -480,7 +480,7 @@ class ConstOrV { template , V>>> ConstOrV(V index) // NOLINT(runtime/explicit) - : constant_value_(), value_(index) {} + : constant_value_(std::nullopt), value_(index) {} bool is_constant() const { return constant_value_.has_value(); } constant_type constant_value() const {