Skip to content

Commit 58604ff

Browse files
committed
[Runtime] Fix memory ordering on a store in ConcurrentReadableArray.
1 parent e387b36 commit 58604ff

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/swift/Runtime/Concurrent.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -517,7 +517,7 @@ template <class ElemTy> struct ConcurrentReadableArray {
517517
auto *newStorage = Storage::allocate(newCapacity);
518518
if (storage) {
519519
std::copy(storage->data(), storage->data() + count, newStorage->data());
520-
newStorage->Count.store(count, std::memory_order_relaxed);
520+
newStorage->Count.store(count, std::memory_order_release);
521521
FreeList.push_back(storage);
522522
}
523523

0 commit comments

Comments
 (0)