From b4ecc0e2d098f2d5370a14bf45923692b29a5a31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20Inf=C3=BChr?= Date: Fri, 11 Sep 2020 14:38:53 +0200 Subject: [PATCH] [heap][test] Set FLAG_local_heaps first before creating context MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit FLAG_local_heaps needs to be set before creating the context, otherwise the StressConcurrentAllocatorTask is already started. Setting the flag then races with background thread, which checks FLAG_local_heaps while creating LocalHeap. Bug: v8:10315 Change-Id: If6de748ec174dffb94a2582d24e37d24586ee95a Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2404823 Reviewed-by: Ulan Degenbaev Commit-Queue: Dominik Inführ Cr-Commit-Position: refs/heads/master@{#69850} --- test/cctest/test-concurrent-descriptor-array.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/cctest/test-concurrent-descriptor-array.cc b/test/cctest/test-concurrent-descriptor-array.cc index 83763b4140..4b18c3b132 100644 --- a/test/cctest/test-concurrent-descriptor-array.cc +++ b/test/cctest/test-concurrent-descriptor-array.cc @@ -70,8 +70,8 @@ class ConcurrentSearchThread final : public v8::base::Thread { // Uses linear search on a flat object, with up to 8 elements. TEST(LinearSearchFlatObject) { - CcTest::InitializeVM(); FLAG_local_heaps = true; + CcTest::InitializeVM(); Isolate* isolate = CcTest::i_isolate(); std::unique_ptr ph = isolate->NewPersistentHandles();