Skip to content

Commit 98629ba

Browse files
committed
deps: patch V8 to 8.1.307.30
Refs: v8/v8@8.1.307.28...8.1.307.30
1 parent 91b1820 commit 98629ba

File tree

6 files changed

+54
-3
lines changed

6 files changed

+54
-3
lines changed

deps/v8/include/v8-version.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#define V8_MAJOR_VERSION 8
1212
#define V8_MINOR_VERSION 1
1313
#define V8_BUILD_NUMBER 307
14-
#define V8_PATCH_LEVEL 28
14+
#define V8_PATCH_LEVEL 30
1515

1616
// Use 1 for candidates and 0 otherwise.
1717
// (Boolean macro values are not supported by all preprocessors.)

deps/v8/src/regexp/regexp-interpreter.cc

+23-2
Original file line numberDiff line numberDiff line change
@@ -1051,8 +1051,29 @@ IrregexpInterpreter::Result IrregexpInterpreter::MatchForCallFromJs(
10511051
return IrregexpInterpreter::RETRY;
10521052
}
10531053

1054-
return Match(isolate, regexp_obj, subject_string, registers, registers_length,
1055-
start_position, call_origin);
1054+
// In generated code, registers are allocated on the stack. The given
1055+
// `registers` argument is only guaranteed to hold enough space for permanent
1056+
// registers (i.e. for captures), and not for temporary registers used only
1057+
// during matcher execution. We match that behavior in the interpreter by
1058+
// using a SmallVector as internal register storage.
1059+
static constexpr int kBaseRegisterArraySize = 64; // Arbitrary.
1060+
const int internal_register_count =
1061+
Smi::ToInt(regexp_obj.DataAt(JSRegExp::kIrregexpMaxRegisterCountIndex));
1062+
base::SmallVector<int, kBaseRegisterArraySize> internal_registers(
1063+
internal_register_count);
1064+
1065+
Result result =
1066+
Match(isolate, regexp_obj, subject_string, internal_registers.data(),
1067+
internal_register_count, start_position, call_origin);
1068+
1069+
// Copy capture registers to the output array.
1070+
if (result == IrregexpInterpreter::SUCCESS) {
1071+
CHECK_GE(internal_registers.size(), registers_length);
1072+
MemCopy(registers, internal_registers.data(),
1073+
registers_length * sizeof(registers[0]));
1074+
}
1075+
1076+
return result;
10561077
}
10571078

10581079
IrregexpInterpreter::Result IrregexpInterpreter::MatchForCallFromRuntime(

deps/v8/src/wasm/wasm-engine.cc

+6
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,9 @@ class WasmGCForegroundTask : public CancelableTask {
129129
std::shared_ptr<NativeModule> NativeModuleCache::MaybeGetNativeModule(
130130
ModuleOrigin origin, Vector<const uint8_t> wire_bytes) {
131131
if (origin != kWasmOrigin) return nullptr;
132+
// Temporarily disabled to fix stability issue on M-81
133+
// (https://crbug.com/1070199).
134+
if (!FLAG_future) return nullptr;
132135
base::MutexGuard lock(&mutex_);
133136
while (true) {
134137
auto it = map_.find(wire_bytes);
@@ -153,6 +156,9 @@ void NativeModuleCache::Update(std::shared_ptr<NativeModule> native_module,
153156
bool error) {
154157
DCHECK_NOT_NULL(native_module);
155158
if (native_module->module()->origin != kWasmOrigin) return;
159+
// Temporarily disabled to fix stability issue on M-81
160+
// (https://crbug.com/1070199).
161+
if (!FLAG_future) return;
156162
Vector<const uint8_t> wire_bytes = native_module->wire_bytes();
157163
base::MutexGuard lock(&mutex_);
158164
auto it = map_.find(wire_bytes);

deps/v8/test/cctest/cctest.status

+7
Original file line numberDiff line numberDiff line change
@@ -600,4 +600,11 @@
600600
'test-cpu-profiler/DeoptUntrackedFunction': [SKIP],
601601
}], # variant == turboprop
602602

603+
##############################################################################
604+
['variant != future', {
605+
# Wasm native module cache is temporarily disabled in non-future variant
606+
# (https://crbug.com/1070199)
607+
'test-compilation-cache/*': [SKIP]
608+
}], # variant != future
609+
603610
]

deps/v8/test/inspector/inspector.status

+6
Original file line numberDiff line numberDiff line change
@@ -84,5 +84,11 @@
8484
}], # 'arch == s390 or arch == s390x'
8585

8686
##############################################################################
87+
['variant != future', {
88+
# Wasm native module cache is temporarily disabled in non-future variant
89+
# (https://crbug.com/1070199)
90+
'debugger/wasm-scripts': [SKIP],
91+
}], # variant != future
92+
8793

8894
]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// Copyright 2020 the V8 project authors. All rights reserved.
2+
// Use of this source code is governed by a BSD-style license that can be
3+
// found in the LICENSE file.
4+
//
5+
// Flags: --allow-natives-syntax
6+
7+
const needle = Array(1802).join(" +") + Array(16884).join("A");
8+
const string = "A";
9+
10+
assertEquals(string.search(needle), -1);
11+
assertEquals(string.search(needle), -1);

0 commit comments

Comments
 (0)