Skip to content

Commit 2608c03

Browse files
rmacnak-googleCommit Queue
authored andcommitted
[vm, gc] Avoid growth policy data race.
TEST=tsan Bug: #61862 Change-Id: Icd16140999282b33fd9fbcceda901b82e4267c7a Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/458421 Reviewed-by: Alexander Aprelev <[email protected]> Commit-Queue: Ryan Macnak <[email protected]>
1 parent e0fe7ef commit 2608c03

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

runtime/vm/dart_api_impl.cc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6008,6 +6008,9 @@ DART_EXPORT Dart_Handle Dart_FinalizeLoading(bool complete_futures) {
60086008
// If this is an auxiliary isolate inside a larger isolate group, we will not
60096009
// re-initialize the growth policy.
60106010
if (I->group()->ContainsOnlyOneIsolate()) {
6011+
// Helper tasks like the background compile might be running. Avoid data
6012+
// races on the growth policy.
6013+
GcSafepointOperationScope safepoint(T);
60116014
I->group()->heap()->old_space()->EvaluateAfterLoading();
60126015
}
60136016

0 commit comments

Comments
 (0)