Block/resume primitive [v8/v8 : main]

0 views
Skip to first unread message

Maksim Ivanov (Gerrit)

unread,
Jun 8, 2026, 11:18:38 AM (6 days ago) Jun 8
to Michael Lippautz, v8-s...@luci-project-accounts.iam.gserviceaccount.com, dmercadi...@chromium.org, leszek...@chromium.org, v8-re...@googlegroups.com, verwaes...@chromium.org, victorgo...@chromium.org
Attention needed from Michael Lippautz

Maksim Ivanov voted and added 1 comment

Votes added by Maksim Ivanov

Commit-Queue+0

1 comment

Patchset-level comments
File-level comment, Patchset 1 (Latest):
Maksim Ivanov . unresolved

Still not fully polished, but sharing for initial feedback. Using a GN flag guard to avoid having to think about performance in cross-thread syncing logic.

Open in Gerrit

Related details

Attention is currently required from:
  • Michael Lippautz
Submit Requirements:
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: v8/v8
Gerrit-Branch: main
Gerrit-Change-Id: I50b1aad1270fb06dd926c8c62f34651c1be5fe91
Gerrit-Change-Number: 7903673
Gerrit-PatchSet: 1
Gerrit-Owner: Maksim Ivanov <em...@google.com>
Gerrit-Reviewer: Maksim Ivanov <em...@google.com>
Gerrit-Reviewer: Michael Lippautz <mlip...@chromium.org>
Gerrit-Attention: Michael Lippautz <mlip...@chromium.org>
Gerrit-Comment-Date: Mon, 08 Jun 2026 15:18:34 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
unsatisfied_requirement
open
diffy

Michael Lippautz (Gerrit)

unread,
Jun 8, 2026, 11:40:54 AM (6 days ago) Jun 8
to Maksim Ivanov, v8-s...@luci-project-accounts.iam.gserviceaccount.com, dmercadi...@chromium.org, leszek...@chromium.org, v8-re...@googlegroups.com, verwaes...@chromium.org, victorgo...@chromium.org
Attention needed from Maksim Ivanov

Michael Lippautz added 2 comments

Patchset-level comments
Michael Lippautz . resolved

Will look at this in more detail in a bit.

File src/runtime/runtime-test.cc
Line 2890, Patchset 1 (Latest):} // namespace internal
Michael Lippautz . unresolved

Food for thought: IIRC we also had issues where the main thread needed to block "some time". Can we have a similar helper that for `BlockForAt(timeout, synchronziation point)` that schedules a background task which unblock the point before it goes to sleep?

Open in Gerrit

Related details

Attention is currently required from:
  • Maksim Ivanov
Submit Requirements:
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: v8/v8
Gerrit-Branch: main
Gerrit-Change-Id: I50b1aad1270fb06dd926c8c62f34651c1be5fe91
Gerrit-Change-Number: 7903673
Gerrit-PatchSet: 1
Gerrit-Owner: Maksim Ivanov <em...@google.com>
Gerrit-Reviewer: Maksim Ivanov <em...@google.com>
Gerrit-Reviewer: Michael Lippautz <mlip...@chromium.org>
Gerrit-Attention: Maksim Ivanov <em...@google.com>
Gerrit-Comment-Date: Mon, 08 Jun 2026 15:40:51 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
unsatisfied_requirement
open
diffy

Maksim Ivanov (Gerrit)

unread,
Jun 8, 2026, 10:32:30 PM (5 days ago) Jun 8
to Michael Lippautz, v8-s...@luci-project-accounts.iam.gserviceaccount.com, dmercadi...@chromium.org, leszek...@chromium.org, v8-re...@googlegroups.com, verwaes...@chromium.org, victorgo...@chromium.org
Attention needed from Michael Lippautz

Maksim Ivanov voted and added 2 comments

Votes added by Maksim Ivanov

Commit-Queue+1

2 comments

Commit Message
Line 7, Patchset 4:[testing] Block/resume primitive
Maksim Ivanov . unresolved

I've checked that this API works to craft a straightforward POC for crbug.com/514446876. And that adding one more `SYNCHRONIZATION_POINT_FOR_TESTING` gives a reliable POC for crbug.com/519664497.

File src/runtime/runtime-test.cc
Line 2890, Patchset 1:} // namespace internal
Michael Lippautz . unresolved

Food for thought: IIRC we also had issues where the main thread needed to block "some time". Can we have a similar helper that for `BlockForAt(timeout, synchronziation point)` that schedules a background task which unblock the point before it goes to sleep?

Maksim Ivanov

If you mean the same primitive as in the CL but that "sleeps" for a given timeout instead of waiting indefinitely for "resume" - yes, that was the plan for a follow-up CL; the same groundwork would work.

If you mean allowing e.g. a Web Worker to block/resume operations on the main thread, then it might be possible as well but I haven't thought it through very well (at least having the state in `IsolateGroup` should allow for that).

Open in Gerrit

Related details

Attention is currently required from:
  • Michael Lippautz
Submit Requirements:
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: v8/v8
Gerrit-Branch: main
Gerrit-Change-Id: I50b1aad1270fb06dd926c8c62f34651c1be5fe91
Gerrit-Change-Number: 7903673
Gerrit-PatchSet: 7
Gerrit-Owner: Maksim Ivanov <em...@google.com>
Gerrit-Reviewer: Maksim Ivanov <em...@google.com>
Gerrit-Reviewer: Michael Lippautz <mlip...@chromium.org>
Gerrit-Attention: Michael Lippautz <mlip...@chromium.org>
Gerrit-Comment-Date: Tue, 09 Jun 2026 02:32:25 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: Michael Lippautz <mlip...@chromium.org>
unsatisfied_requirement
open
diffy

Michael Lippautz (Gerrit)

unread,
Jun 9, 2026, 3:15:46 AM (5 days ago) Jun 9
to Maksim Ivanov, v8-s...@luci-project-accounts.iam.gserviceaccount.com, dmercadi...@chromium.org, leszek...@chromium.org, v8-re...@googlegroups.com, verwaes...@chromium.org, victorgo...@chromium.org
Attention needed from Maksim Ivanov

Michael Lippautz added 5 comments

File BUILD.gn
Line 1344, Patchset 7 (Latest): defines += [ "V8_ENABLE_SYNCHRONIZATION_POINT_API" ]
Michael Lippautz . unresolved

I wonder if we need this with my comment below. Would be nice to just be able to use it on any build with --allow-natives-syntax

File src/init/isolate-group.cc
Line 761, Patchset 7 (Latest): std::string_view synchronization_point) {
Michael Lippautz . unresolved

I think you may not need a separate compile mode if you create a guard here.

IsolateGroup:Current() for Chrome is fast because we only have a single one. We can guard this with a single relaxed load here.

Line 765, Patchset 7 (Latest): synchronization_point_data_for_testing_.find(synchronization_point);
Michael Lippautz . unresolved

This always performs lock + lookup, even when not used. The bailout will fix this as well.

File src/maglev/maglev-compiler.cc
Line 252, Patchset 7 (Latest):std::pair<MaybeHandle<Code>, BailoutReason> MaglevCompiler::GenerateCode(
Michael Lippautz . unresolved

I think this is main thread. How would this work with the current approach?

File src/runtime/runtime-test.cc
Line 2890, Patchset 1:} // namespace internal
Michael Lippautz . unresolved

Food for thought: IIRC we also had issues where the main thread needed to block "some time". Can we have a similar helper that for `BlockForAt(timeout, synchronziation point)` that schedules a background task which unblock the point before it goes to sleep?

Maksim Ivanov

If you mean the same primitive as in the CL but that "sleeps" for a given timeout instead of waiting indefinitely for "resume" - yes, that was the plan for a follow-up CL; the same groundwork would work.

If you mean allowing e.g. a Web Worker to block/resume operations on the main thread, then it might be possible as well but I haven't thought it through very well (at least having the state in `IsolateGroup` should allow for that).

Michael Lippautz

If you mean the same primitive as in the CL but that "sleeps" for a given timeout instead of waiting indefinitely for "resume" - yes, that was the plan for a follow-up CL; the same groundwork would work.

This is what I meant yeah. It should unblock waiting on the main thread that is triggered from the main thread.

If you mean allowing e.g. a Web Worker to block/resume operations on the main thread, then it might be possible as well but I haven't thought it through very well (at least having the state in `IsolateGroup` should allow for that).

IIUC this should already work based on the current CL here. It's a bit annoyin to set up though.

Open in Gerrit

Related details

Attention is currently required from:
  • Maksim Ivanov
Submit Requirements:
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: v8/v8
Gerrit-Branch: main
Gerrit-Change-Id: I50b1aad1270fb06dd926c8c62f34651c1be5fe91
Gerrit-Change-Number: 7903673
Gerrit-PatchSet: 7
Gerrit-Owner: Maksim Ivanov <em...@google.com>
Gerrit-Reviewer: Maksim Ivanov <em...@google.com>
Gerrit-Reviewer: Michael Lippautz <mlip...@chromium.org>
Gerrit-Attention: Maksim Ivanov <em...@google.com>
Gerrit-Comment-Date: Tue, 09 Jun 2026 07:15:17 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Maksim Ivanov <em...@google.com>
Comment-In-Reply-To: Michael Lippautz <mlip...@chromium.org>
unsatisfied_requirement
open
diffy

Maksim Ivanov (Gerrit)

unread,
Jun 9, 2026, 11:29:18 AM (5 days ago) Jun 9
to Arash Kazemi, Michael Lippautz, v8-s...@luci-project-accounts.iam.gserviceaccount.com, dmercadi...@chromium.org, leszek...@chromium.org, v8-re...@googlegroups.com, verwaes...@chromium.org, victorgo...@chromium.org
Attention needed from Arash Kazemi and Michael Lippautz

Maksim Ivanov voted and added 3 comments

Votes added by Maksim Ivanov

Commit-Queue+1

3 comments

Patchset-level comments
File-level comment, Patchset 11 (Latest):
Maksim Ivanov . resolved

+arashk@ for another pair of eyes, and also because of a verifier test issue.

File src/maglev/maglev-compiler.cc
Line 252, Patchset 7:std::pair<MaybeHandle<Code>, BailoutReason> MaglevCompiler::GenerateCode(
Michael Lippautz . unresolved

I think this is main thread. How would this work with the current approach?

Maksim Ivanov

I've updated the CL - I believe now the main-thread stuff can be blocked from e.g. Web Workers.

File test/mjsunit/sandbox/regress/regress-507520268.js
Line 10, Patchset 11 (Latest):let id = 615; // Runtime::kWasmAllocateFeedbackVector
Maksim Ivanov . unresolved

This is unfortunate but the test hardcodes a specific ID, and every CL that shifts numbers will break it. I'll think about a way to address it in a follow-up (a dictionary of builtin names?).

Open in Gerrit

Related details

Attention is currently required from:
  • Arash Kazemi
  • Michael Lippautz
Submit Requirements:
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: v8/v8
Gerrit-Branch: main
Gerrit-Change-Id: I50b1aad1270fb06dd926c8c62f34651c1be5fe91
Gerrit-Change-Number: 7903673
Gerrit-PatchSet: 11
Gerrit-Owner: Maksim Ivanov <em...@google.com>
Gerrit-Reviewer: Arash Kazemi <ara...@chromium.org>
Gerrit-Attention: Michael Lippautz <mlip...@chromium.org>
Gerrit-Attention: Arash Kazemi <ara...@chromium.org>
Gerrit-Comment-Date: Tue, 09 Jun 2026 15:29:13 +0000
unsatisfied_requirement
open
diffy

Maksim Ivanov (Gerrit)

unread,
Jun 9, 2026, 11:30:44 AM (5 days ago) Jun 9
to Arash Kazemi, Michael Lippautz, v8-s...@luci-project-accounts.iam.gserviceaccount.com, dmercadi...@chromium.org, leszek...@chromium.org, v8-re...@googlegroups.com, verwaes...@chromium.org, victorgo...@chromium.org
Attention needed from Arash Kazemi and Michael Lippautz

Maksim Ivanov added 3 comments

File BUILD.gn
Line 1344, Patchset 7: defines += [ "V8_ENABLE_SYNCHRONIZATION_POINT_API" ]
Michael Lippautz . resolved

I wonder if we need this with my comment below. Would be nice to just be able to use it on any build with --allow-natives-syntax

Maksim Ivanov

Done

File src/init/isolate-group.cc
Line 761, Patchset 7: std::string_view synchronization_point) {
Michael Lippautz . resolved

I think you may not need a separate compile mode if you create a guard here.

IsolateGroup:Current() for Chrome is fast because we only have a single one. We can guard this with a single relaxed load here.

Maksim Ivanov

Done - indeed this seems to be neutral on benchmarks! Thanks.

Line 765, Patchset 7: synchronization_point_data_for_testing_.find(synchronization_point);
Michael Lippautz . resolved

This always performs lock + lookup, even when not used. The bailout will fix this as well.

Maksim Ivanov

Done. We could also add a cheaper bailout via an atomic flag, but in my measurement this only slows down --allow-native-syntax tests by 1%, so probably not necessary?

Gerrit-Comment-Date: Tue, 09 Jun 2026 15:30:39 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Michael Lippautz <mlip...@chromium.org>
unsatisfied_requirement
open
diffy

Maksim Ivanov (Gerrit)

unread,
Jun 9, 2026, 11:47:12 AM (5 days ago) Jun 9
to Matthias Liedtke, Arash Kazemi, Michael Lippautz, v8-s...@luci-project-accounts.iam.gserviceaccount.com, dmercadi...@chromium.org, leszek...@chromium.org, v8-re...@googlegroups.com, verwaes...@chromium.org, victorgo...@chromium.org
Attention needed from Arash Kazemi, Matthias Liedtke and Michael Lippautz

Maksim Ivanov added 1 comment

File src/runtime/runtime-test.cc
Line 2851, Patchset 12 (Latest):RUNTIME_FUNCTION(Runtime_BlockAt) {
Maksim Ivanov . unresolved

@mliedtke: Does this API look good from the Fuzzilli perspective? I presume I'll need to write a custom generator with the hardcoded list of string arguments in Fuzzilli.

Or would it be much better if V8 maintained a list of all synchronization point names, so that Fuzzilli could fetch it? (another function call, a global constant, etc.)

Open in Gerrit

Related details

Attention is currently required from:
  • Arash Kazemi
  • Matthias Liedtke
  • Michael Lippautz
Submit Requirements:
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: v8/v8
Gerrit-Branch: main
Gerrit-Change-Id: I50b1aad1270fb06dd926c8c62f34651c1be5fe91
Gerrit-Change-Number: 7903673
Gerrit-PatchSet: 12
Gerrit-Owner: Maksim Ivanov <em...@google.com>
Gerrit-Reviewer: Arash Kazemi <ara...@chromium.org>
Gerrit-Reviewer: Maksim Ivanov <em...@google.com>
Gerrit-Reviewer: Matthias Liedtke <mlie...@chromium.org>
Gerrit-Reviewer: Michael Lippautz <mlip...@chromium.org>
Gerrit-Attention: Michael Lippautz <mlip...@chromium.org>
Gerrit-Attention: Arash Kazemi <ara...@chromium.org>
Gerrit-Attention: Matthias Liedtke <mlie...@chromium.org>
Gerrit-Comment-Date: Tue, 09 Jun 2026 15:47:01 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
unsatisfied_requirement
open
diffy

Maksim Ivanov (Gerrit)

unread,
Jun 9, 2026, 11:49:04 AM (5 days ago) Jun 9
to Matthias Liedtke, Arash Kazemi, Michael Lippautz, v8-s...@luci-project-accounts.iam.gserviceaccount.com, dmercadi...@chromium.org, leszek...@chromium.org, v8-re...@googlegroups.com, verwaes...@chromium.org, victorgo...@chromium.org
Attention needed from Arash Kazemi, Matthias Liedtke and Michael Lippautz

Maksim Ivanov added 1 comment

File src/runtime/runtime-test.cc
Line 2851, Patchset 12 (Latest):RUNTIME_FUNCTION(Runtime_BlockAt) {
Maksim Ivanov . unresolved

@mliedtke: Does this API look good from the Fuzzilli perspective? I presume I'll need to write a custom generator with the hardcoded list of string arguments in Fuzzilli.

Or would it be much better if V8 maintained a list of all synchronization point names, so that Fuzzilli could fetch it? (another function call, a global constant, etc.)

Maksim Ivanov

And another question is whether to cap the sleep at e.g. N seconds, to prevent complete deadlocks.

Gerrit-Comment-Date: Tue, 09 Jun 2026 15:48:59 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Maksim Ivanov <em...@google.com>
unsatisfied_requirement
open
diffy

Matthias Liedtke (Gerrit)

unread,
Jun 9, 2026, 11:55:37 AM (5 days ago) Jun 9
to Maksim Ivanov, Arash Kazemi, Michael Lippautz, v8-s...@luci-project-accounts.iam.gserviceaccount.com, dmercadi...@chromium.org, leszek...@chromium.org, v8-re...@googlegroups.com, verwaes...@chromium.org, victorgo...@chromium.org
Attention needed from Arash Kazemi, Maksim Ivanov and Michael Lippautz

Matthias Liedtke added 1 comment

File src/runtime/runtime-test.cc
Line 2851, Patchset 12 (Latest):RUNTIME_FUNCTION(Runtime_BlockAt) {
Maksim Ivanov . unresolved

@mliedtke: Does this API look good from the Fuzzilli perspective? I presume I'll need to write a custom generator with the hardcoded list of string arguments in Fuzzilli.

Or would it be much better if V8 maintained a list of all synchronization point names, so that Fuzzilli could fetch it? (another function call, a global constant, etc.)

Matthias Liedtke

How would that work for a fuzzer? How would a fuzzer make use of it?
Realistically it would probably only ever do the `%BlockAt` reliably and then we'd wait until timeout (1-2 seconds) and then just restart the d8 executable.
`%SetDelayAt("foo", 100 /*ms*/);` or something similar could be used by a fuzzer but even then, do we expect that a fuzzer will stumble upon useful invocations of this?

It won't know whether it needs to trigger a tier-up or a gc or whichever action that is necessary to reach the "foo" point and if it isn't a delay but actually a block as proposed here, it would need multi-threading if this would cause the block to happen on the main thread (e.g. something that isn't background-compilation or background-gc). If it happens on the background, it would still need to actively delay the time before it calls `%Resume()` as JS doesn't have a sleep function (and `setTimeout` doesn't actually wait until the timeout is reached in d8 I think).

Open in Gerrit

Related details

Attention is currently required from:
  • Arash Kazemi
  • Maksim Ivanov
  • Michael Lippautz
Submit Requirements:
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: v8/v8
Gerrit-Branch: main
Gerrit-Change-Id: I50b1aad1270fb06dd926c8c62f34651c1be5fe91
Gerrit-Change-Number: 7903673
Gerrit-PatchSet: 12
Gerrit-Owner: Maksim Ivanov <em...@google.com>
Gerrit-Reviewer: Arash Kazemi <ara...@chromium.org>
Gerrit-Reviewer: Maksim Ivanov <em...@google.com>
Gerrit-Reviewer: Matthias Liedtke <mlie...@chromium.org>
Gerrit-Reviewer: Michael Lippautz <mlip...@chromium.org>
Gerrit-Attention: Maksim Ivanov <em...@google.com>
Gerrit-Attention: Michael Lippautz <mlip...@chromium.org>
Gerrit-Attention: Arash Kazemi <ara...@chromium.org>
Gerrit-Comment-Date: Tue, 09 Jun 2026 15:55:30 +0000
unsatisfied_requirement
open
diffy

Arash Kazemi (Gerrit)

unread,
Jun 9, 2026, 12:15:51 PM (5 days ago) Jun 9
to Maksim Ivanov, Matthias Liedtke, Michael Lippautz, v8-s...@luci-project-accounts.iam.gserviceaccount.com, dmercadi...@chromium.org, leszek...@chromium.org, v8-re...@googlegroups.com, verwaes...@chromium.org, victorgo...@chromium.org
Attention needed from Maksim Ivanov and Michael Lippautz

Arash Kazemi added 1 comment

File test/mjsunit/sandbox/regress/regress-507520268.js
Line 10, Patchset 11:let id = 615; // Runtime::kWasmAllocateFeedbackVector
Maksim Ivanov . unresolved

This is unfortunate but the test hardcodes a specific ID, and every CL that shifts numbers will break it. I'll think about a way to address it in a follow-up (a dictionary of builtin names?).

Arash Kazemi

I think we can move it to `bytecode-verifier-unittest`, from what I can see there is no requirement for this to be a mjsunit test. We already have a similar test there (`ForbiddenRuntimeFunction`) so maybe we don't even care that much about keeping this specific function in the regressions or we can parameterize the test.

Open in Gerrit

Related details

Attention is currently required from:
  • Maksim Ivanov
  • Michael Lippautz
Submit Requirements:
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: v8/v8
Gerrit-Branch: main
Gerrit-Change-Id: I50b1aad1270fb06dd926c8c62f34651c1be5fe91
Gerrit-Change-Number: 7903673
Gerrit-PatchSet: 12
Gerrit-Owner: Maksim Ivanov <em...@google.com>
Gerrit-Reviewer: Arash Kazemi <ara...@chromium.org>
Gerrit-Reviewer: Maksim Ivanov <em...@google.com>
Gerrit-Reviewer: Matthias Liedtke <mlie...@chromium.org>
Gerrit-Reviewer: Michael Lippautz <mlip...@chromium.org>
Gerrit-Attention: Maksim Ivanov <em...@google.com>
Gerrit-Attention: Michael Lippautz <mlip...@chromium.org>
Gerrit-Comment-Date: Tue, 09 Jun 2026 16:15:44 +0000
unsatisfied_requirement
open
diffy

Michael Lippautz (Gerrit)

unread,
Jun 9, 2026, 12:33:18 PM (5 days ago) Jun 9
to Maksim Ivanov, Matthias Liedtke, Arash Kazemi, v8-s...@luci-project-accounts.iam.gserviceaccount.com, dmercadi...@chromium.org, leszek...@chromium.org, v8-re...@googlegroups.com, verwaes...@chromium.org, victorgo...@chromium.org
Attention needed from Maksim Ivanov

Michael Lippautz added 1 comment

File src/runtime/runtime-test.cc
Line 2851, Patchset 12 (Latest):RUNTIME_FUNCTION(Runtime_BlockAt) {
Maksim Ivanov . unresolved

@mliedtke: Does this API look good from the Fuzzilli perspective? I presume I'll need to write a custom generator with the hardcoded list of string arguments in Fuzzilli.

Or would it be much better if V8 maintained a list of all synchronization point names, so that Fuzzilli could fetch it? (another function call, a global constant, etc.)

Matthias Liedtke

How would that work for a fuzzer? How would a fuzzer make use of it?
Realistically it would probably only ever do the `%BlockAt` reliably and then we'd wait until timeout (1-2 seconds) and then just restart the d8 executable.
`%SetDelayAt("foo", 100 /*ms*/);` or something similar could be used by a fuzzer but even then, do we expect that a fuzzer will stumble upon useful invocations of this?

It won't know whether it needs to trigger a tier-up or a gc or whichever action that is necessary to reach the "foo" point and if it isn't a delay but actually a block as proposed here, it would need multi-threading if this would cause the block to happen on the main thread (e.g. something that isn't background-compilation or background-gc). If it happens on the background, it would still need to actively delay the time before it calls `%Resume()` as JS doesn't have a sleep function (and `setTimeout` doesn't actually wait until the timeout is reached in d8 I think).

Michael Lippautz

`%SetDelayAt()` is also what I was suggesting below. Maybe that can be a follow up?

Open in Gerrit

Related details

Attention is currently required from:
  • Maksim Ivanov
Submit Requirements:
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: v8/v8
Gerrit-Branch: main
Gerrit-Change-Id: I50b1aad1270fb06dd926c8c62f34651c1be5fe91
Gerrit-Change-Number: 7903673
Gerrit-PatchSet: 12
Gerrit-Owner: Maksim Ivanov <em...@google.com>
Gerrit-Reviewer: Arash Kazemi <ara...@chromium.org>
Gerrit-Reviewer: Maksim Ivanov <em...@google.com>
Gerrit-Reviewer: Matthias Liedtke <mlie...@chromium.org>
Gerrit-Reviewer: Michael Lippautz <mlip...@chromium.org>
Gerrit-Attention: Maksim Ivanov <em...@google.com>
Gerrit-Comment-Date: Tue, 09 Jun 2026 16:33:10 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Maksim Ivanov <em...@google.com>
Comment-In-Reply-To: Matthias Liedtke <mlie...@chromium.org>
unsatisfied_requirement
open
diffy

Michael Lippautz (Gerrit)

unread,
Jun 9, 2026, 12:57:19 PM (5 days ago) Jun 9
to Maksim Ivanov, Matthias Liedtke, Arash Kazemi, v8-s...@luci-project-accounts.iam.gserviceaccount.com, dmercadi...@chromium.org, leszek...@chromium.org, v8-re...@googlegroups.com, verwaes...@chromium.org, victorgo...@chromium.org
Attention needed from Maksim Ivanov

Michael Lippautz voted and added 4 comments

Votes added by Michael Lippautz

Code-Review+1

4 comments

Patchset-level comments
File-level comment, Patchset 12 (Latest):
Michael Lippautz . resolved

lgtm, I think we can iterate on this

File src/init/isolate-group.h
Line 320, Patchset 12 (Latest): void SetBlockAtSynchronizationPointForTesting(
Michael Lippautz . unresolved

super-nit: Can we move the `*ForTesting()` methods to the end of the public section? (This is not strictly enforced anywhere but it is often nice to navigate this way.)

File src/init/isolate-group.cc
Line 760, Patchset 12 (Latest): if (V8_LIKELY(!v8_flags.allow_natives_syntax)) return;
Michael Lippautz . unresolved

Maybe another bool like `ever_set_any_synchronization_point_` would be better? (To keep it independent of --allow-natives-syntax)

Line 760, Patchset 12 (Latest): if (V8_LIKELY(!v8_flags.allow_natives_syntax)) return;
Michael Lippautz . unresolved

nit: new code often uses [[likely]] already (which is supported)

Open in Gerrit

Related details

Attention is currently required from:
  • Maksim Ivanov
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: v8/v8
Gerrit-Branch: main
Gerrit-Change-Id: I50b1aad1270fb06dd926c8c62f34651c1be5fe91
Gerrit-Change-Number: 7903673
Gerrit-PatchSet: 12
Gerrit-Owner: Maksim Ivanov <em...@google.com>
Gerrit-Reviewer: Arash Kazemi <ara...@chromium.org>
Gerrit-Reviewer: Maksim Ivanov <em...@google.com>
Gerrit-Reviewer: Matthias Liedtke <mlie...@chromium.org>
Gerrit-Reviewer: Michael Lippautz <mlip...@chromium.org>
Gerrit-Attention: Maksim Ivanov <em...@google.com>
Gerrit-Comment-Date: Tue, 09 Jun 2026 16:57:14 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Michael Lippautz (Gerrit)

unread,
Jun 9, 2026, 12:58:11 PM (5 days ago) Jun 9
to Maksim Ivanov, Leszek Swirski, Matthias Liedtke, Arash Kazemi, v8-s...@luci-project-accounts.iam.gserviceaccount.com, dmercadi...@chromium.org, leszek...@chromium.org, v8-re...@googlegroups.com, verwaes...@chromium.org, victorgo...@chromium.org
Attention needed from Leszek Swirski and Maksim Ivanov

Michael Lippautz added 1 comment

Patchset-level comments
Michael Lippautz . resolved

+leszeks for all the compilers

Open in Gerrit

Related details

Attention is currently required from:
  • Leszek Swirski
  • Maksim Ivanov
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: v8/v8
Gerrit-Branch: main
Gerrit-Change-Id: I50b1aad1270fb06dd926c8c62f34651c1be5fe91
Gerrit-Change-Number: 7903673
Gerrit-PatchSet: 12
Gerrit-Owner: Maksim Ivanov <em...@google.com>
Gerrit-Reviewer: Arash Kazemi <ara...@chromium.org>
Gerrit-Reviewer: Leszek Swirski <les...@chromium.org>
Gerrit-Reviewer: Maksim Ivanov <em...@google.com>
Gerrit-Reviewer: Matthias Liedtke <mlie...@chromium.org>
Gerrit-Reviewer: Michael Lippautz <mlip...@chromium.org>
Gerrit-Attention: Maksim Ivanov <em...@google.com>
Gerrit-Attention: Leszek Swirski <les...@chromium.org>
Gerrit-Comment-Date: Tue, 09 Jun 2026 16:58:06 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Maksim Ivanov (Gerrit)

unread,
Jun 9, 2026, 9:36:31 PM (4 days ago) Jun 9
to Leszek Swirski, Michael Lippautz, Matthias Liedtke, Arash Kazemi, v8-s...@luci-project-accounts.iam.gserviceaccount.com, dmercadi...@chromium.org, leszek...@chromium.org, v8-re...@googlegroups.com, verwaes...@chromium.org, victorgo...@chromium.org
Attention needed from Arash Kazemi, Leszek Swirski, Matthias Liedtke and Michael Lippautz

Maksim Ivanov added 8 comments

Patchset-level comments
File-level comment, Patchset 16 (Latest):
Maksim Ivanov . resolved

thanks for the comments!

File src/init/isolate-group.h
Line 320, Patchset 12: void SetBlockAtSynchronizationPointForTesting(
Michael Lippautz . resolved

super-nit: Can we move the `*ForTesting()` methods to the end of the public section? (This is not strictly enforced anywhere but it is often nice to navigate this way.)

Maksim Ivanov

Done

File src/init/isolate-group.cc
Line 760, Patchset 12: if (V8_LIKELY(!v8_flags.allow_natives_syntax)) return;
Michael Lippautz . resolved

Maybe another bool like `ever_set_any_synchronization_point_` would be better? (To keep it independent of --allow-natives-syntax)

Maksim Ivanov

Done (called it "any_synchronization_point_for_testing_" for consistency with other symbols).

Line 760, Patchset 12: if (V8_LIKELY(!v8_flags.allow_natives_syntax)) return;
Michael Lippautz . resolved

nit: new code often uses [[likely]] already (which is supported)

Maksim Ivanov

Done

File src/maglev/maglev-compiler.cc
Line 252, Patchset 7:std::pair<MaybeHandle<Code>, BailoutReason> MaglevCompiler::GenerateCode(
Michael Lippautz . resolved

I think this is main thread. How would this work with the current approach?

Maksim Ivanov

I've updated the CL - I believe now the main-thread stuff can be blocked from e.g. Web Workers.

Maksim Ivanov

resolving

File src/runtime/runtime-test.cc
Line 2851, Patchset 12:RUNTIME_FUNCTION(Runtime_BlockAt) {
Maksim Ivanov . unresolved

@mliedtke: Does this API look good from the Fuzzilli perspective? I presume I'll need to write a custom generator with the hardcoded list of string arguments in Fuzzilli.

Or would it be much better if V8 maintained a list of all synchronization point names, so that Fuzzilli could fetch it? (another function call, a global constant, etc.)

Matthias Liedtke

How would that work for a fuzzer? How would a fuzzer make use of it?
Realistically it would probably only ever do the `%BlockAt` reliably and then we'd wait until timeout (1-2 seconds) and then just restart the d8 executable.
`%SetDelayAt("foo", 100 /*ms*/);` or something similar could be used by a fuzzer but even then, do we expect that a fuzzer will stumble upon useful invocations of this?

It won't know whether it needs to trigger a tier-up or a gc or whichever action that is necessary to reach the "foo" point and if it isn't a delay but actually a block as proposed here, it would need multi-threading if this would cause the block to happen on the main thread (e.g. something that isn't background-compilation or background-gc). If it happens on the background, it would still need to actively delay the time before it calls `%Resume()` as JS doesn't have a sleep function (and `setTimeout` doesn't actually wait until the timeout is reached in d8 I think).

Michael Lippautz

`%SetDelayAt()` is also what I was suggesting below. Maybe that can be a follow up?

Maksim Ivanov

`SetDelayAt()` would be one way, yes - planned for a follow-up.

Another pattern, possible immediately with this CL, would be (also shown in the `regress-502997649.js` from the latest patchset):

```
// main thread:
%BlockAt(xyz);
... do something to trigger a bg job hitting `xyz` ...
... optionally, a busy-loop sleep ...
%Resume(xyz);
```

This second pattern can also be made more robust if we provide `%WaitUntilBlocked()` - to avoid the need in busy-loop waits.

P.S. Generally, yes, it's clear that the fuzzer won't intrinsically know how a particular `xyz` string arg is correlated with interesting candidates for the `do something` block. Still I think there's a chance it can discover something interesting when randomly mutating according to this pattern - but it needs to pass a really existing argument to `BlockAt`/`Resume`, not some random garbage that'd be ignored.

File test/mjsunit/sandbox/regress/regress-502997649.js
File-level comment, Patchset 16 (Latest):
Maksim Ivanov . unresolved

As a showcase for the API, crafted a POC for an older crbug.com/502997649. This snippet triggers sandbox violation detection when reverting the fix for that bug.

File test/mjsunit/sandbox/regress/regress-507520268.js
Line 10, Patchset 11:let id = 615; // Runtime::kWasmAllocateFeedbackVector
Maksim Ivanov . resolved

This is unfortunate but the test hardcodes a specific ID, and every CL that shifts numbers will break it. I'll think about a way to address it in a follow-up (a dictionary of builtin names?).

Arash Kazemi

I think we can move it to `bytecode-verifier-unittest`, from what I can see there is no requirement for this to be a mjsunit test. We already have a similar test there (`ForbiddenRuntimeFunction`) so maybe we don't even care that much about keeping this specific function in the regressions or we can parameterize the test.

Maksim Ivanov

Acknowledged, thanks!

Open in Gerrit

Related details

Attention is currently required from:
  • Arash Kazemi
  • Leszek Swirski
  • Matthias Liedtke
  • Michael Lippautz
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: v8/v8
Gerrit-Branch: main
Gerrit-Change-Id: I50b1aad1270fb06dd926c8c62f34651c1be5fe91
Gerrit-Change-Number: 7903673
Gerrit-PatchSet: 16
Gerrit-Owner: Maksim Ivanov <em...@google.com>
Gerrit-Reviewer: Arash Kazemi <ara...@chromium.org>
Gerrit-Reviewer: Leszek Swirski <les...@chromium.org>
Gerrit-Reviewer: Maksim Ivanov <em...@google.com>
Gerrit-Reviewer: Matthias Liedtke <mlie...@chromium.org>
Gerrit-Reviewer: Michael Lippautz <mlip...@chromium.org>
Gerrit-Attention: Arash Kazemi <ara...@chromium.org>
Gerrit-Attention: Michael Lippautz <mlip...@chromium.org>
Gerrit-Attention: Matthias Liedtke <mlie...@chromium.org>
Gerrit-Attention: Leszek Swirski <les...@chromium.org>
Gerrit-Comment-Date: Wed, 10 Jun 2026 01:36:13 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Maksim Ivanov <em...@google.com>
Comment-In-Reply-To: Michael Lippautz <mlip...@chromium.org>
Comment-In-Reply-To: Arash Kazemi <ara...@chromium.org>
Comment-In-Reply-To: Matthias Liedtke <mlie...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy

Arash Kazemi (Gerrit)

unread,
Jun 10, 2026, 4:28:58 AM (4 days ago) Jun 10
to Maksim Ivanov, Leszek Swirski, Michael Lippautz, Matthias Liedtke, v8-s...@luci-project-accounts.iam.gserviceaccount.com, dmercadi...@chromium.org, leszek...@chromium.org, v8-re...@googlegroups.com, verwaes...@chromium.org, victorgo...@chromium.org
Attention needed from Leszek Swirski, Maksim Ivanov, Matthias Liedtke and Michael Lippautz

Arash Kazemi voted and added 2 comments

Votes added by Arash Kazemi

Code-Review+1

2 comments

Patchset-level comments
Arash Kazemi . resolved

LGTM thanks!

File src/init/isolate-group.h
Line 459, Patchset 16 (Latest): IsolateGroup::current()->DoSynchronizationPointForTesting(sync_point_name)
Arash Kazemi . unresolved

Although I don't think it should, did you measure how much checking for synchronization points impacts compilation times for example for maglev?

Open in Gerrit

Related details

Attention is currently required from:
  • Leszek Swirski
  • Maksim Ivanov
  • Matthias Liedtke
  • Michael Lippautz
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: v8/v8
Gerrit-Branch: main
Gerrit-Change-Id: I50b1aad1270fb06dd926c8c62f34651c1be5fe91
Gerrit-Change-Number: 7903673
Gerrit-PatchSet: 16
Gerrit-Owner: Maksim Ivanov <em...@google.com>
Gerrit-Reviewer: Arash Kazemi <ara...@chromium.org>
Gerrit-Reviewer: Leszek Swirski <les...@chromium.org>
Gerrit-Reviewer: Maksim Ivanov <em...@google.com>
Gerrit-Reviewer: Matthias Liedtke <mlie...@chromium.org>
Gerrit-Reviewer: Michael Lippautz <mlip...@chromium.org>
Gerrit-Attention: Maksim Ivanov <em...@google.com>
Gerrit-Attention: Michael Lippautz <mlip...@chromium.org>
Gerrit-Attention: Matthias Liedtke <mlie...@chromium.org>
Gerrit-Attention: Leszek Swirski <les...@chromium.org>
Gerrit-Comment-Date: Wed, 10 Jun 2026 08:28:54 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Matthias Liedtke (Gerrit)

unread,
Jun 10, 2026, 4:49:18 AM (4 days ago) Jun 10
to Maksim Ivanov, Arash Kazemi, Leszek Swirski, Michael Lippautz, v8-s...@luci-project-accounts.iam.gserviceaccount.com, dmercadi...@chromium.org, leszek...@chromium.org, v8-re...@googlegroups.com, verwaes...@chromium.org, victorgo...@chromium.org
Attention needed from Leszek Swirski, Maksim Ivanov and Michael Lippautz

Matthias Liedtke voted and added 2 comments

Votes added by Matthias Liedtke

Code-Review+1

2 comments

Patchset-level comments
Matthias Liedtke . resolved

LGTM on the design

File src/runtime/runtime-test.cc
Line 2851, Patchset 12:RUNTIME_FUNCTION(Runtime_BlockAt) {
Maksim Ivanov . unresolved

@mliedtke: Does this API look good from the Fuzzilli perspective? I presume I'll need to write a custom generator with the hardcoded list of string arguments in Fuzzilli.

Or would it be much better if V8 maintained a list of all synchronization point names, so that Fuzzilli could fetch it? (another function call, a global constant, etc.)

Matthias Liedtke

How would that work for a fuzzer? How would a fuzzer make use of it?
Realistically it would probably only ever do the `%BlockAt` reliably and then we'd wait until timeout (1-2 seconds) and then just restart the d8 executable.
`%SetDelayAt("foo", 100 /*ms*/);` or something similar could be used by a fuzzer but even then, do we expect that a fuzzer will stumble upon useful invocations of this?

It won't know whether it needs to trigger a tier-up or a gc or whichever action that is necessary to reach the "foo" point and if it isn't a delay but actually a block as proposed here, it would need multi-threading if this would cause the block to happen on the main thread (e.g. something that isn't background-compilation or background-gc). If it happens on the background, it would still need to actively delay the time before it calls `%Resume()` as JS doesn't have a sleep function (and `setTimeout` doesn't actually wait until the timeout is reached in d8 I think).

Michael Lippautz

`%SetDelayAt()` is also what I was suggesting below. Maybe that can be a follow up?

Maksim Ivanov

`SetDelayAt()` would be one way, yes - planned for a follow-up.

Another pattern, possible immediately with this CL, would be (also shown in the `regress-502997649.js` from the latest patchset):

```
// main thread:
%BlockAt(xyz);
... do something to trigger a bg job hitting `xyz` ...
... optionally, a busy-loop sleep ...
%Resume(xyz);
```

This second pattern can also be made more robust if we provide `%WaitUntilBlocked()` - to avoid the need in busy-loop waits.

P.S. Generally, yes, it's clear that the fuzzer won't intrinsically know how a particular `xyz` string arg is correlated with interesting candidates for the `do something` block. Still I think there's a chance it can discover something interesting when randomly mutating according to this pattern - but it needs to pass a really existing argument to `BlockAt`/`Resume`, not some random garbage that'd be ignored.

Matthias Liedtke

Making it pass something predefined is easy, that can be done by a generator.
I agree that it can just by accident generate patterns where it emits `BlockAt(xyz);` and then something that might hit xyz.
The problem is that without the `%Resume(xyz)` it's going to timeout and not be added to the corpus. So this isn't something that the fuzzer can incrementally explore by adding one more thing each step but instead it needs to basically generate it in one attempt which is unlikely unless you write a generator that emits all the missing pieces in one go which might be hard. And then blocking and resuming itself isn't actually testing anything interesting, unless you make it also do something that potentially has side effects between blocking and resuming so that this test case is actually interesting. Having existing test cases with these patterns in the regression tests that we import would certainly help there as well.

The API itself sounds fine, feel free to go ahead with it, just saying that the fuzzer won't explore this in the same way as it can explore complex JS test cases due to the mentioned issues.

Open in Gerrit

Related details

Attention is currently required from:
  • Leszek Swirski
  • Maksim Ivanov
  • Michael Lippautz
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: v8/v8
Gerrit-Branch: main
Gerrit-Change-Id: I50b1aad1270fb06dd926c8c62f34651c1be5fe91
Gerrit-Change-Number: 7903673
Gerrit-PatchSet: 16
Gerrit-Owner: Maksim Ivanov <em...@google.com>
Gerrit-Reviewer: Arash Kazemi <ara...@chromium.org>
Gerrit-Reviewer: Leszek Swirski <les...@chromium.org>
Gerrit-Reviewer: Maksim Ivanov <em...@google.com>
Gerrit-Reviewer: Matthias Liedtke <mlie...@chromium.org>
Gerrit-Reviewer: Michael Lippautz <mlip...@chromium.org>
Gerrit-Attention: Maksim Ivanov <em...@google.com>
Gerrit-Attention: Michael Lippautz <mlip...@chromium.org>
Gerrit-Attention: Leszek Swirski <les...@chromium.org>
Gerrit-Comment-Date: Wed, 10 Jun 2026 08:49:09 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: Maksim Ivanov <em...@google.com>
Comment-In-Reply-To: Michael Lippautz <mlip...@chromium.org>
Comment-In-Reply-To: Matthias Liedtke <mlie...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy

Maksim Ivanov (Gerrit)

unread,
Jun 10, 2026, 9:01:46 AM (4 days ago) Jun 10
to Matthias Liedtke, Arash Kazemi, Leszek Swirski, Michael Lippautz, v8-s...@luci-project-accounts.iam.gserviceaccount.com, dmercadi...@chromium.org, leszek...@chromium.org, v8-re...@googlegroups.com, verwaes...@chromium.org, victorgo...@chromium.org
Attention needed from Arash Kazemi, Leszek Swirski and Michael Lippautz

Maksim Ivanov added 2 comments

File src/init/isolate-group.h
Line 459, Patchset 16 (Latest): IsolateGroup::current()->DoSynchronizationPointForTesting(sync_point_name)
Arash Kazemi . unresolved

Although I don't think it should, did you measure how much checking for synchronization points impacts compilation times for example for maglev?

Maksim Ivanov

I tried benchmarking via `BenchMaglev` and haven't seen any measurable difference. In general, I've seen some heavy mjsunit tests running ~1% slower with this change.

If it becomes too bad in the future (e.g. if we add many SYNCHRONIZATION_POINTs to hot paths) we can consider further optimizations and/or an `ifdef`.

File src/runtime/runtime-test.cc
Line 2851, Patchset 12:RUNTIME_FUNCTION(Runtime_BlockAt) {
Maksim Ivanov . resolved

@mliedtke: Does this API look good from the Fuzzilli perspective? I presume I'll need to write a custom generator with the hardcoded list of string arguments in Fuzzilli.

Or would it be much better if V8 maintained a list of all synchronization point names, so that Fuzzilli could fetch it? (another function call, a global constant, etc.)

Matthias Liedtke

How would that work for a fuzzer? How would a fuzzer make use of it?
Realistically it would probably only ever do the `%BlockAt` reliably and then we'd wait until timeout (1-2 seconds) and then just restart the d8 executable.
`%SetDelayAt("foo", 100 /*ms*/);` or something similar could be used by a fuzzer but even then, do we expect that a fuzzer will stumble upon useful invocations of this?

It won't know whether it needs to trigger a tier-up or a gc or whichever action that is necessary to reach the "foo" point and if it isn't a delay but actually a block as proposed here, it would need multi-threading if this would cause the block to happen on the main thread (e.g. something that isn't background-compilation or background-gc). If it happens on the background, it would still need to actively delay the time before it calls `%Resume()` as JS doesn't have a sleep function (and `setTimeout` doesn't actually wait until the timeout is reached in d8 I think).

Michael Lippautz

`%SetDelayAt()` is also what I was suggesting below. Maybe that can be a follow up?

Maksim Ivanov

`SetDelayAt()` would be one way, yes - planned for a follow-up.

Another pattern, possible immediately with this CL, would be (also shown in the `regress-502997649.js` from the latest patchset):

```
// main thread:
%BlockAt(xyz);
... do something to trigger a bg job hitting `xyz` ...
... optionally, a busy-loop sleep ...
%Resume(xyz);
```

This second pattern can also be made more robust if we provide `%WaitUntilBlocked()` - to avoid the need in busy-loop waits.

P.S. Generally, yes, it's clear that the fuzzer won't intrinsically know how a particular `xyz` string arg is correlated with interesting candidates for the `do something` block. Still I think there's a chance it can discover something interesting when randomly mutating according to this pattern - but it needs to pass a really existing argument to `BlockAt`/`Resume`, not some random garbage that'd be ignored.

Matthias Liedtke

Making it pass something predefined is easy, that can be done by a generator.
I agree that it can just by accident generate patterns where it emits `BlockAt(xyz);` and then something that might hit xyz.
The problem is that without the `%Resume(xyz)` it's going to timeout and not be added to the corpus. So this isn't something that the fuzzer can incrementally explore by adding one more thing each step but instead it needs to basically generate it in one attempt which is unlikely unless you write a generator that emits all the missing pieces in one go which might be hard. And then blocking and resuming itself isn't actually testing anything interesting, unless you make it also do something that potentially has side effects between blocking and resuming so that this test case is actually interesting. Having existing test cases with these patterns in the regression tests that we import would certainly help there as well.

The API itself sounds fine, feel free to go ahead with it, just saying that the fuzzer won't explore this in the same way as it can explore complex JS test cases due to the mentioned issues.

Maksim Ivanov

Marked as resolved, thanks for the input!

Open in Gerrit

Related details

Attention is currently required from:
  • Arash Kazemi
  • Leszek Swirski
  • Michael Lippautz
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: v8/v8
Gerrit-Branch: main
Gerrit-Change-Id: I50b1aad1270fb06dd926c8c62f34651c1be5fe91
Gerrit-Change-Number: 7903673
Gerrit-PatchSet: 16
Gerrit-Owner: Maksim Ivanov <em...@google.com>
Gerrit-Reviewer: Arash Kazemi <ara...@chromium.org>
Gerrit-Reviewer: Leszek Swirski <les...@chromium.org>
Gerrit-Reviewer: Maksim Ivanov <em...@google.com>
Gerrit-Reviewer: Matthias Liedtke <mlie...@chromium.org>
Gerrit-Reviewer: Michael Lippautz <mlip...@chromium.org>
Gerrit-Attention: Arash Kazemi <ara...@chromium.org>
Gerrit-Attention: Michael Lippautz <mlip...@chromium.org>
Gerrit-Attention: Leszek Swirski <les...@chromium.org>
Gerrit-Comment-Date: Wed, 10 Jun 2026 13:01:29 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Maksim Ivanov <em...@google.com>
Comment-In-Reply-To: Arash Kazemi <ara...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy

Arash Kazemi (Gerrit)

unread,
Jun 10, 2026, 9:08:39 AM (4 days ago) Jun 10
to Maksim Ivanov, Matthias Liedtke, Leszek Swirski, Michael Lippautz, v8-s...@luci-project-accounts.iam.gserviceaccount.com, dmercadi...@chromium.org, leszek...@chromium.org, v8-re...@googlegroups.com, verwaes...@chromium.org, victorgo...@chromium.org
Attention needed from Leszek Swirski, Maksim Ivanov and Michael Lippautz

Arash Kazemi added 1 comment

File src/init/isolate-group.h
Line 459, Patchset 16 (Latest): IsolateGroup::current()->DoSynchronizationPointForTesting(sync_point_name)
Arash Kazemi . resolved

Although I don't think it should, did you measure how much checking for synchronization points impacts compilation times for example for maglev?

Maksim Ivanov

I tried benchmarking via `BenchMaglev` and haven't seen any measurable difference. In general, I've seen some heavy mjsunit tests running ~1% slower with this change.

If it becomes too bad in the future (e.g. if we add many SYNCHRONIZATION_POINTs to hot paths) we can consider further optimizations and/or an `ifdef`.

Arash Kazemi

Makes sense, thank you for checking!

Open in Gerrit

Related details

Attention is currently required from:
  • Leszek Swirski
  • Maksim Ivanov
  • Michael Lippautz
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: v8/v8
Gerrit-Branch: main
Gerrit-Change-Id: I50b1aad1270fb06dd926c8c62f34651c1be5fe91
Gerrit-Change-Number: 7903673
Gerrit-PatchSet: 16
Gerrit-Owner: Maksim Ivanov <em...@google.com>
Gerrit-Reviewer: Arash Kazemi <ara...@chromium.org>
Gerrit-Reviewer: Leszek Swirski <les...@chromium.org>
Gerrit-Reviewer: Maksim Ivanov <em...@google.com>
Gerrit-Reviewer: Matthias Liedtke <mlie...@chromium.org>
Gerrit-Reviewer: Michael Lippautz <mlip...@chromium.org>
Gerrit-Attention: Maksim Ivanov <em...@google.com>
Gerrit-Attention: Michael Lippautz <mlip...@chromium.org>
Gerrit-Attention: Leszek Swirski <les...@chromium.org>
Gerrit-Comment-Date: Wed, 10 Jun 2026 13:08:33 +0000
satisfied_requirement
unsatisfied_requirement
open
diffy

Michael Lippautz (Gerrit)

unread,
Jun 10, 2026, 9:11:11 AM (4 days ago) Jun 10
to Maksim Ivanov, Matthias Liedtke, Arash Kazemi, Leszek Swirski, v8-s...@luci-project-accounts.iam.gserviceaccount.com, dmercadi...@chromium.org, leszek...@chromium.org, v8-re...@googlegroups.com, verwaes...@chromium.org, victorgo...@chromium.org
Attention needed from Leszek Swirski and Maksim Ivanov

Michael Lippautz voted Code-Review+1

Code-Review+1
Open in Gerrit

Related details

Attention is currently required from:
  • Leszek Swirski
  • Maksim Ivanov
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: v8/v8
Gerrit-Branch: main
Gerrit-Change-Id: I50b1aad1270fb06dd926c8c62f34651c1be5fe91
Gerrit-Change-Number: 7903673
Gerrit-PatchSet: 16
Gerrit-Owner: Maksim Ivanov <em...@google.com>
Gerrit-Reviewer: Arash Kazemi <ara...@chromium.org>
Gerrit-Reviewer: Leszek Swirski <les...@chromium.org>
Gerrit-Reviewer: Maksim Ivanov <em...@google.com>
Gerrit-Reviewer: Matthias Liedtke <mlie...@chromium.org>
Gerrit-Reviewer: Michael Lippautz <mlip...@chromium.org>
Gerrit-Attention: Maksim Ivanov <em...@google.com>
Gerrit-Attention: Leszek Swirski <les...@chromium.org>
Gerrit-Comment-Date: Wed, 10 Jun 2026 13:11:03 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Leszek Swirski (Gerrit)

unread,
Jun 10, 2026, 9:27:49 AM (4 days ago) Jun 10
to Maksim Ivanov, Michael Lippautz, Matthias Liedtke, Arash Kazemi, v8-s...@luci-project-accounts.iam.gserviceaccount.com, dmercadi...@chromium.org, leszek...@chromium.org, v8-re...@googlegroups.com, verwaes...@chromium.org, victorgo...@chromium.org
Attention needed from Maksim Ivanov

Leszek Swirski added 3 comments

File src/runtime/runtime-test.cc
Line 2856, Patchset 16 (Latest): isolate->isolate_group()->SetBlockAtSynchronizationPointForTesting(
Leszek Swirski . unresolved

can we also register the thread Id that requested the block, and CHECK that it's not the same as the thread that is about to pause? To detect deadlock in another way than timeouts

File test/mjsunit/sandbox/regress/regress-502997649.js
Line 30, Patchset 16 (Latest):%OptimizeFunctionOnNextCall(g, 'concurrent');
Leszek Swirski . unresolved

I would expect this to be paired with `%WaitForBackgroundOptimization()`, probably instead of the second busy loop.

Line 33, Patchset 16 (Latest):let start = Date.now();
while (Date.now() - start < 1000) {}
Leszek Swirski . unresolved

instead of busy looping here, should there be a `%WaitUntilBlocked('TurbofanEarlyGraphTrimming')`?

Open in Gerrit

Related details

Attention is currently required from:
  • Maksim Ivanov
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: v8/v8
Gerrit-Branch: main
Gerrit-Change-Id: I50b1aad1270fb06dd926c8c62f34651c1be5fe91
Gerrit-Change-Number: 7903673
Gerrit-PatchSet: 16
Gerrit-Owner: Maksim Ivanov <em...@google.com>
Gerrit-Reviewer: Arash Kazemi <ara...@chromium.org>
Gerrit-Reviewer: Leszek Swirski <les...@chromium.org>
Gerrit-Reviewer: Maksim Ivanov <em...@google.com>
Gerrit-Reviewer: Matthias Liedtke <mlie...@chromium.org>
Gerrit-Reviewer: Michael Lippautz <mlip...@chromium.org>
Gerrit-Attention: Maksim Ivanov <em...@google.com>
Gerrit-Comment-Date: Wed, 10 Jun 2026 13:27:43 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Maksim Ivanov (Gerrit)

unread,
Jun 10, 2026, 7:47:15 PM (3 days ago) Jun 10
to Michael Lippautz, Matthias Liedtke, Arash Kazemi, Leszek Swirski, v8-s...@luci-project-accounts.iam.gserviceaccount.com, dmercadi...@chromium.org, leszek...@chromium.org, v8-re...@googlegroups.com, verwaes...@chromium.org, victorgo...@chromium.org
Attention needed from Arash Kazemi, Leszek Swirski, Matthias Liedtke and Michael Lippautz

Maksim Ivanov added 4 comments

File src/runtime/runtime-test.cc
Line 2856, Patchset 16: isolate->isolate_group()->SetBlockAtSynchronizationPointForTesting(
Leszek Swirski . resolved

can we also register the thread Id that requested the block, and CHECK that it's not the same as the thread that is about to pause? To detect deadlock in another way than timeouts

Maksim Ivanov

Done

File test/mjsunit/sandbox/regress/regress-502997649.js
File-level comment, Patchset 16:
Maksim Ivanov . resolved

As a showcase for the API, crafted a POC for an older crbug.com/502997649. This snippet triggers sandbox violation detection when reverting the fix for that bug.

Maksim Ivanov

resolving.

Line 30, Patchset 16:%OptimizeFunctionOnNextCall(g, 'concurrent');
Leszek Swirski . resolved

I would expect this to be paired with `%WaitForBackgroundOptimization()`, probably instead of the second busy loop.

Maksim Ivanov

Done

Line 33, Patchset 16:let start = Date.now();

while (Date.now() - start < 1000) {}
Leszek Swirski . resolved

instead of busy looping here, should there be a `%WaitUntilBlocked('TurbofanEarlyGraphTrimming')`?

Maksim Ivanov

Acknowledged - Yes, will add this in a follow-up. Just focusing on the first CL with the basic functionality for now.

Open in Gerrit

Related details

Attention is currently required from:
  • Arash Kazemi
  • Leszek Swirski
  • Matthias Liedtke
  • Michael Lippautz
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: v8/v8
Gerrit-Branch: main
Gerrit-Change-Id: I50b1aad1270fb06dd926c8c62f34651c1be5fe91
Gerrit-Change-Number: 7903673
Gerrit-PatchSet: 18
Gerrit-Owner: Maksim Ivanov <em...@google.com>
Gerrit-Reviewer: Arash Kazemi <ara...@chromium.org>
Gerrit-Reviewer: Leszek Swirski <les...@chromium.org>
Gerrit-Reviewer: Maksim Ivanov <em...@google.com>
Gerrit-Reviewer: Matthias Liedtke <mlie...@chromium.org>
Gerrit-Reviewer: Michael Lippautz <mlip...@chromium.org>
Gerrit-Attention: Michael Lippautz <mlip...@chromium.org>
Gerrit-Attention: Arash Kazemi <ara...@chromium.org>
Gerrit-Attention: Matthias Liedtke <mlie...@chromium.org>
Gerrit-Attention: Leszek Swirski <les...@chromium.org>
Gerrit-Comment-Date: Wed, 10 Jun 2026 23:47:09 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Maksim Ivanov <em...@google.com>
Comment-In-Reply-To: Leszek Swirski <les...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy

Michael Lippautz (Gerrit)

unread,
Jun 11, 2026, 3:48:12 AM (3 days ago) Jun 11
to Maksim Ivanov, Matthias Liedtke, Arash Kazemi, Leszek Swirski, v8-s...@luci-project-accounts.iam.gserviceaccount.com, dmercadi...@chromium.org, leszek...@chromium.org, v8-re...@googlegroups.com, verwaes...@chromium.org, victorgo...@chromium.org
Attention needed from Arash Kazemi, Leszek Swirski, Maksim Ivanov and Matthias Liedtke

Michael Lippautz voted Code-Review+1

Code-Review+1
Open in Gerrit

Related details

Attention is currently required from:
  • Arash Kazemi
  • Leszek Swirski
  • Maksim Ivanov
  • Matthias Liedtke
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: v8/v8
Gerrit-Branch: main
Gerrit-Change-Id: I50b1aad1270fb06dd926c8c62f34651c1be5fe91
Gerrit-Change-Number: 7903673
Gerrit-PatchSet: 18
Gerrit-Owner: Maksim Ivanov <em...@google.com>
Gerrit-Reviewer: Arash Kazemi <ara...@chromium.org>
Gerrit-Reviewer: Leszek Swirski <les...@chromium.org>
Gerrit-Reviewer: Maksim Ivanov <em...@google.com>
Gerrit-Reviewer: Matthias Liedtke <mlie...@chromium.org>
Gerrit-Reviewer: Michael Lippautz <mlip...@chromium.org>
Gerrit-Attention: Maksim Ivanov <em...@google.com>
Gerrit-Attention: Arash Kazemi <ara...@chromium.org>
Gerrit-Attention: Matthias Liedtke <mlie...@chromium.org>
Gerrit-Attention: Leszek Swirski <les...@chromium.org>
Gerrit-Comment-Date: Thu, 11 Jun 2026 07:48:08 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Leszek Swirski (Gerrit)

unread,
Jun 11, 2026, 4:52:15 AM (3 days ago) Jun 11
to Maksim Ivanov, Michael Lippautz, Matthias Liedtke, Arash Kazemi, v8-s...@luci-project-accounts.iam.gserviceaccount.com, dmercadi...@chromium.org, leszek...@chromium.org, v8-re...@googlegroups.com, verwaes...@chromium.org, victorgo...@chromium.org
Attention needed from Arash Kazemi, Maksim Ivanov and Matthias Liedtke

Leszek Swirski voted Code-Review+1

Code-Review+1
Open in Gerrit

Related details

Attention is currently required from:
  • Arash Kazemi
  • Maksim Ivanov
  • Matthias Liedtke
Gerrit-Comment-Date: Thu, 11 Jun 2026 08:52:11 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Maksim Ivanov (Gerrit)

unread,
Jun 11, 2026, 5:01:02 AM (3 days ago) Jun 11
to Michael Lippautz, Matthias Liedtke, Arash Kazemi, v8-s...@luci-project-accounts.iam.gserviceaccount.com, dmercadi...@chromium.org, leszek...@chromium.org, v8-re...@googlegroups.com, verwaes...@chromium.org, victorgo...@chromium.org
Attention needed from Arash Kazemi and Matthias Liedtke

Maksim Ivanov voted and added 3 comments

Votes added by Maksim Ivanov

Commit-Queue+2

3 comments

Patchset-level comments
File-level comment, Patchset 18 (Latest):
Maksim Ivanov . resolved

thanks everyone for the reviews!

Commit Message
Line 7, Patchset 4:[testing] Block/resume primitive
Maksim Ivanov . resolved

I've checked that this API works to craft a straightforward POC for crbug.com/514446876. And that adding one more `SYNCHRONIZATION_POINT_FOR_TESTING` gives a reliable POC for crbug.com/519664497.

Maksim Ivanov

resolving

File src/runtime/runtime-test.cc
Line 2890, Patchset 1:} // namespace internal
Michael Lippautz . resolved

Food for thought: IIRC we also had issues where the main thread needed to block "some time". Can we have a similar helper that for `BlockForAt(timeout, synchronziation point)` that schedules a background task which unblock the point before it goes to sleep?

Maksim Ivanov

If you mean the same primitive as in the CL but that "sleeps" for a given timeout instead of waiting indefinitely for "resume" - yes, that was the plan for a follow-up CL; the same groundwork would work.

If you mean allowing e.g. a Web Worker to block/resume operations on the main thread, then it might be possible as well but I haven't thought it through very well (at least having the state in `IsolateGroup` should allow for that).

Michael Lippautz

If you mean the same primitive as in the CL but that "sleeps" for a given timeout instead of waiting indefinitely for "resume" - yes, that was the plan for a follow-up CL; the same groundwork would work.

This is what I meant yeah. It should unblock waiting on the main thread that is triggered from the main thread.

If you mean allowing e.g. a Web Worker to block/resume operations on the main thread, then it might be possible as well but I haven't thought it through very well (at least having the state in `IsolateGroup` should allow for that).

IIUC this should already work based on the current CL here. It's a bit annoyin to set up though.

Maksim Ivanov

Ack - will implement in a follow-up.

Open in Gerrit

Related details

Attention is currently required from:
  • Arash Kazemi
  • Matthias Liedtke
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: v8/v8
Gerrit-Branch: main
Gerrit-Change-Id: I50b1aad1270fb06dd926c8c62f34651c1be5fe91
Gerrit-Change-Number: 7903673
Gerrit-PatchSet: 18
Gerrit-Owner: Maksim Ivanov <em...@google.com>
Gerrit-Reviewer: Arash Kazemi <ara...@chromium.org>
Gerrit-Reviewer: Leszek Swirski <les...@chromium.org>
Gerrit-Reviewer: Maksim Ivanov <em...@google.com>
Gerrit-Reviewer: Matthias Liedtke <mlie...@chromium.org>
Gerrit-Reviewer: Michael Lippautz <mlip...@chromium.org>
Gerrit-Attention: Arash Kazemi <ara...@chromium.org>
Gerrit-Attention: Matthias Liedtke <mlie...@chromium.org>
Gerrit-Comment-Date: Thu, 11 Jun 2026 09:00:57 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: Maksim Ivanov <em...@google.com>
Comment-In-Reply-To: Michael Lippautz <mlip...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy

Maksim Ivanov (Gerrit)

unread,
Jun 11, 2026, 5:01:58 AM (3 days ago) Jun 11
to Michael Lippautz, Matthias Liedtke, Arash Kazemi, v8-s...@luci-project-accounts.iam.gserviceaccount.com, dmercadi...@chromium.org, leszek...@chromium.org, v8-re...@googlegroups.com, verwaes...@chromium.org, victorgo...@chromium.org
Attention needed from Arash Kazemi and Matthias Liedtke

Maksim Ivanov voted and added 1 comment

Votes added by Maksim Ivanov

Commit-Queue+2

1 comment

Patchset-level comments
File-level comment, Patchset 1:
Maksim Ivanov . resolved

Still not fully polished, but sharing for initial feedback. Using a GN flag guard to avoid having to think about performance in cross-thread syncing logic.

Maksim Ivanov

resolving

Open in Gerrit

Related details

Attention is currently required from:
  • Arash Kazemi
  • Matthias Liedtke
Submit Requirements:
    • requirement satisfiedCode-Owners
    • requirement satisfiedCode-Review
    • requirement satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: v8/v8
    Gerrit-Branch: main
    Gerrit-Change-Id: I50b1aad1270fb06dd926c8c62f34651c1be5fe91
    Gerrit-Change-Number: 7903673
    Gerrit-PatchSet: 18
    Gerrit-Owner: Maksim Ivanov <em...@google.com>
    Gerrit-Reviewer: Arash Kazemi <ara...@chromium.org>
    Gerrit-Reviewer: Leszek Swirski <les...@chromium.org>
    Gerrit-Reviewer: Maksim Ivanov <em...@google.com>
    Gerrit-Reviewer: Matthias Liedtke <mlie...@chromium.org>
    Gerrit-Reviewer: Michael Lippautz <mlip...@chromium.org>
    Gerrit-Attention: Arash Kazemi <ara...@chromium.org>
    Gerrit-Attention: Matthias Liedtke <mlie...@chromium.org>
    Gerrit-Comment-Date: Thu, 11 Jun 2026 09:01:54 +0000
    satisfied_requirement
    open
    diffy

    v8-scoped@luci-project-accounts.iam.gserviceaccount.com (Gerrit)

    unread,
    Jun 11, 2026, 5:03:53 AM (3 days ago) Jun 11
    to Maksim Ivanov, Leszek Swirski, Michael Lippautz, Matthias Liedtke, Arash Kazemi, dmercadi...@chromium.org, leszek...@chromium.org, v8-re...@googlegroups.com, verwaes...@chromium.org, victorgo...@chromium.org

    v8-s...@luci-project-accounts.iam.gserviceaccount.com submitted the change

    Change information

    Commit message:
    [testing] Block/resume primitive

    Allow fuzzers and tests to block&resume at predefined strategic
    locations in V8 - "synchronization points". This should help fuzzers and
    developers create deterministic reproducers for specific data races.

    The C++ code has to be prepared via the
    `SYNCHRONIZATION_POINT_FOR_TESTING("foo")` macros. The JS code can then
    call `%BlockAt("foo")` and `%Resume("foo")` to halt/unhalt the code
    reaching the corresponding location (when the natives are enabled).
    Bug: 514998642
    Change-Id: I50b1aad1270fb06dd926c8c62f34651c1be5fe91
    Reviewed-by: Leszek Swirski <les...@chromium.org>
    Reviewed-by: Michael Lippautz <mlip...@chromium.org>
    Commit-Queue: Maksim Ivanov <em...@google.com>
    Cr-Commit-Position: refs/heads/main@{#107906}
    Files:
    • M src/compiler/phase.h
    • M src/compiler/pipeline.cc
    • M src/compiler/turboshaft/phase.h
    • M src/compiler/turboshaft/pipelines.h
    • M src/compiler/turboshaft/turbolev-frontend-pipeline.cc
    • M src/handles/persistent-handles.cc
    • M src/init/isolate-group.cc
    • M src/init/isolate-group.h
    • M src/maglev/maglev-compiler.cc
    • M src/maglev/maglev-concurrent-dispatcher.cc
    • M src/runtime/runtime-test.cc
    • M src/runtime/runtime.h
    • A test/mjsunit/sandbox/regress/regress-502997649.js
    Change size: L
    Delta: 13 files changed, 249 insertions(+), 23 deletions(-)
    Branch: refs/heads/main
    Submit Requirements:
    • requirement satisfiedCode-Review: +1 by Leszek Swirski, +1 by Michael Lippautz
    Open in Gerrit
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: merged
    Gerrit-Project: v8/v8
    Gerrit-Branch: main
    Gerrit-Change-Id: I50b1aad1270fb06dd926c8c62f34651c1be5fe91
    Gerrit-Change-Number: 7903673
    Gerrit-PatchSet: 19
    Gerrit-Owner: Maksim Ivanov <em...@google.com>
    Gerrit-Reviewer: Arash Kazemi <ara...@chromium.org>
    Gerrit-Reviewer: Leszek Swirski <les...@chromium.org>
    Gerrit-Reviewer: Maksim Ivanov <em...@google.com>
    Gerrit-Reviewer: Matthias Liedtke <mlie...@chromium.org>
    Gerrit-Reviewer: Michael Lippautz <mlip...@chromium.org>
    open
    diffy
    satisfied_requirement
    Reply all
    Reply to author
    Forward
    0 new messages