Repository: nodejs/node
Pull request: deps: patch V8 to 14.3.127.16

This is an automated patch update of V8 to 14.3.127.16.

Changed files:
filename: deps/v8/include/v8-version.h
patch: @@ -11,7 +11,7 @@
 #define V8_MAJOR_VERSION 14
 #define V8_MINOR_VERSION 3
 #define V8_BUILD_NUMBER 127
-#define V8_PATCH_LEVEL 14
+#define V8_PATCH_LEVEL 16
 
 // Use 1 for candidates and 0 otherwise.
 // (Boolean macro values are not supported by all preprocessors.)

filename: deps/v8/src/objects/intl-objects.cc
patch: @@ -2445,7 +2445,7 @@ std::map<std::string, std::string> LookupAndValidateUnicodeExtensions(
   if (U_FAILURE(status)) return extensions;
 
   if (!keywords) return extensions;
-  char value[ULOC_FULLNAME_CAPACITY];
+  char value[ULOC_FULLNAME_CAPACITY + 1];
 
   int32_t length;
   status = U_ZERO_ERROR;
@@ -2459,7 +2459,8 @@ std::map<std::string, std::string> LookupAndValidateUnicodeExtensions(
       continue;
     }
 
-    icu_locale->getKeywordValue(keyword, value, ULOC_FULLNAME_CAPACITY, status);
+    const int32_t value_len = icu_locale->getKeywordValue(
+        keyword, value, ULOC_FULLNAME_CAPACITY, status);
 
     // Ignore failures in ICU and skip to the next keyword.
     //
@@ -2468,6 +2469,9 @@ std::map<std::string, std::string> LookupAndValidateUnicodeExtensions(
       status = U_ZERO_ERROR;
       continue;
     }
+    // Ensure the `value` is null-terminated even when the `status` is
+    // `U_STRING_NOT_TERMINATED_WARNING`.
+    value[value_len] = '\0';
 
     const char* bcp47_key = uloc_toUnicodeLocaleKey(keyword);
 

filename: deps/v8/src/wasm/wasm-objects.cc
patch: @@ -2497,7 +2497,8 @@ void SetForNonWrapper(Tagged<DispatchTable> dispatch_table, int index,
   } else {
 #if V8_ENABLE_DRUMBRAKE
     // Ignore call_target, not used in jitless mode.
-    WriteField<int>(offset + kFunctionIndexBias, function_index);
+    dispatch_table->template WriteField<int>(
+        offset + DispatchTable::kFunctionIndexBias, function_index);
 #endif  // V8_ENABLE_DRUMBRAKE
   }
   dispatch_table->WriteProtectedPointerField(
@@ -2578,7 +2579,8 @@ void SetForWrapper(
   } else {
 #if V8_ENABLE_DRUMBRAKE
     // Ignore call_target, not used in jitless mode.
-    WriteField<int>(offset + kFunctionIndexBias, function_index);
+    dispatch_table->template WriteField<int>(
+        offset + DispatchTable::kFunctionIndexBias, function_index);
 #endif  // V8_ENABLE_DRUMBRAKE
   }
   if constexpr (requires { DispatchTable::kSigBias; }) {

filename: deps/v8/src/wasm/wasm-objects.h
patch: @@ -961,10 +961,9 @@ class WasmDispatchTableForImports : public TrustedObject {
   // In jitless mode, reuse the 'target' field storage to hold the (uint32_t)
   // function index.
   static constexpr size_t kFunctionIndexBias = kTargetBias;
-#else
+#endif  // V8_ENABLE_DRUMBRAKE
   static constexpr size_t kEntryPaddingSize =
       TAGGED_SIZE_8_BYTES ? kUInt32Size : 0;
-#endif  // V8_ENABLE_DRUMBRAKE
   static_assert(sizeof(WasmCodePointer) == kUInt32Size);
   static constexpr size_t kImplicitArgBias =
       kTargetBias + kEntryPaddingSize + kUInt32Size;

filename: deps/v8/test/intl/date-format/long-locale.js
patch: @@ -0,0 +1,15 @@
+// Copyright 2025 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.
+
+let locale = "zh-TW-u-ca-chinese";
+for (let i = 0; i < 300; ++i) {
+  try {
+    Intl.DateTimeFormat(locale);
+  } catch (e) {
+    // "RangeError: Invalid language tag", for locales ending with "-", or
+    // sub-tags of one character, are not relevant to this test.
+  }
+  locale += (i % 5) ? "a" : "-";
+}
+// Pass if this test doesn't crash.