Commit a15e2b57 authored by Michael Lippautz's avatar Michael Lippautz Committed by V8 LUCI CQ

heap: Fix concurrently acquiring stress marking limit

Bug: v8:12717
Change-Id: I0ffe277dda3eed2073f166f2b93a2f2c611c6d01
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3532232Reviewed-by: 's avatarMichael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79519}
parent 0a5fcd8a
......@@ -5879,6 +5879,9 @@ void Heap::PrintMaxNewSpaceSizeReached() {
}
int Heap::NextStressMarkingLimit() {
// Reuse Heap-global mutex as this getter is called from different threads on
// allocation slow paths.
base::MutexGuard guard(relocation_mutex());
return isolate()->fuzzer_rng()->NextInt(FLAG_stress_marking + 1);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment