Skip to content

Commit 0bd8e14

Browse files
committed
deps: V8: cherry-pick 813066946968
Original commit message: [macro-assembler] Avoid using the isolate in CallRecordWriteStub CallRecordWriteStub is used in a background compile thread for JS-to-Wasm wrapper compilation, so it should avoid accessing the isolate. Call the builtin using CallBuiltin which does not require a Handle<Code> object and instead gets the call target directly from the embedded data. R=​[email protected] (cherry picked from commit 6b3994e8507b32dfb956329395dbe33a2a8fee14) No-Try: true No-Presubmit: true No-Tree-Checks: true Bug: chromium:1146813 Change-Id: I4ee59084e4184f2e9039208e4e6db43482cefde6 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2593333 Reviewed-by: Clemens Backes <[email protected]> Commit-Queue: Thibaud Michaud <[email protected]> Cr-Original-Commit-Position: refs/heads/master@{#71785} Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2731535 Commit-Queue: Victor-Gabriel Savu <[email protected]> Reviewed-by: Jana Grill <[email protected]> Cr-Commit-Position: refs/branch-heads/8.6@{#66} Cr-Branched-From: a64aed2333abf49e494d2a5ce24bbd14fff19f60-refs/heads/8.6.395@{#1} Cr-Branched-From: a626bc036236c9bf92ac7b87dc40c9e538b087e3-refs/heads/master@{#69472} Refs: v8/v8@8130669 PR-URL: #38275 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Jiawen Geng <[email protected]> Reviewed-By: Shelley Vohr <[email protected]>
1 parent d221cdc commit 0bd8e14

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

common.gypi

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636

3737
# Reset this number to 0 on major V8 upgrades.
3838
# Increment by one for each non-official patch applied to deps/v8.
39-
'v8_embedder_string': '-node.46',
39+
'v8_embedder_string': '-node.47',
4040

4141
##### V8 defaults for Node.js #####
4242

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

+10-1
Original file line numberDiff line numberDiff line change
@@ -2536,7 +2536,16 @@ int ChoiceNode::GreedyLoopTextLengthForAlternative(
25362536
SeqRegExpNode* seq_node = static_cast<SeqRegExpNode*>(node);
25372537
node = seq_node->on_success();
25382538
}
2539-
return read_backward() ? -length : length;
2539+
if (read_backward()) {
2540+
length = -length;
2541+
}
2542+
// Check that we can jump by the whole text length. If not, return sentinel
2543+
// to indicate the we can't construct a greedy loop.
2544+
if (length < RegExpMacroAssembler::kMinCPOffset ||
2545+
length > RegExpMacroAssembler::kMaxCPOffset) {
2546+
return kNodeIsTooComplexForGreedyLoops;
2547+
}
2548+
return length;
25402549
}
25412550

25422551
void LoopChoiceNode::AddLoopAlternative(GuardedAlternative alt) {

deps/v8/test/mjsunit/regress/regress-1166138.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44

55
let badregexp = "(?:" + " ".repeat(32768*2)+ ")*";
66
reg = RegExp(badregexp);
7-
reg.test()
7+
assertThrows(() => reg.test(), SyntaxError);

0 commit comments

Comments
 (0)