diff --git a/deps/v8/include/v8-version.h b/deps/v8/include/v8-version.h index 92593cc8f04..a24677d508e 100644 --- a/deps/v8/include/v8-version.h +++ b/deps/v8/include/v8-version.h @@ -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.) diff --git a/deps/v8/src/objects/intl-objects.cc b/deps/v8/src/objects/intl-objects.cc index 67cd5c263cd..463cdd79553 100644 --- a/deps/v8/src/objects/intl-objects.cc +++ b/deps/v8/src/objects/intl-objects.cc @@ -2445,7 +2445,7 @@ std::map 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 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 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); diff --git a/deps/v8/src/wasm/wasm-objects.cc b/deps/v8/src/wasm/wasm-objects.cc index d3139c367e0..e932a8bf226 100644 --- a/deps/v8/src/wasm/wasm-objects.cc +++ b/deps/v8/src/wasm/wasm-objects.cc @@ -2497,7 +2497,8 @@ void SetForNonWrapper(Tagged dispatch_table, int index, } else { #if V8_ENABLE_DRUMBRAKE // Ignore call_target, not used in jitless mode. - WriteField(offset + kFunctionIndexBias, function_index); + dispatch_table->template WriteField( + 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(offset + kFunctionIndexBias, function_index); + dispatch_table->template WriteField( + offset + DispatchTable::kFunctionIndexBias, function_index); #endif // V8_ENABLE_DRUMBRAKE } if constexpr (requires { DispatchTable::kSigBias; }) { diff --git a/deps/v8/src/wasm/wasm-objects.h b/deps/v8/src/wasm/wasm-objects.h index 6c087b79585..1136115ddb9 100644 --- a/deps/v8/src/wasm/wasm-objects.h +++ b/deps/v8/src/wasm/wasm-objects.h @@ -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; diff --git a/deps/v8/test/intl/date-format/long-locale.js b/deps/v8/test/intl/date-format/long-locale.js new file mode 100644 index 00000000000..54d590ecc1b --- /dev/null +++ b/deps/v8/test/intl/date-format/long-locale.js @@ -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.