Skip to content

Commit ca74ec5

Browse files
aamCommit Queue
authored andcommitted
[vm/shared] Use concurrent-aware write when setting shared field init value.
Fixes #61278 TEST=isolate_group_bound_init_test on TSAN Change-Id: I31ce9ef57fc75b142edbcfa6b8248b6b9c003324 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/444367 Reviewed-by: Ryan Macnak <[email protected]> Commit-Queue: Alexander Aprelev <[email protected]>
1 parent 12ba410 commit ca74ec5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

runtime/vm/object.cc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13402,7 +13402,9 @@ void Field::SetStaticValue(const Object& value) const {
1340213402

1340313403
SafepointReadRwLocker ml(thread, thread->isolate_group()->program_lock());
1340413404
if (is_shared()) {
13405-
thread->isolate_group()->shared_field_table()->SetAt(id, value.ptr());
13405+
thread->isolate_group()->shared_field_table()->SetAt(
13406+
id, value.ptr(),
13407+
/*concurrent_use=*/true);
1340613408
} else {
1340713409
thread->isolate()->field_table()->SetAt(id, value.ptr());
1340813410
}

0 commit comments

Comments
 (0)