Skip to content

Commit 665515c

Browse files
authored
Merge pull request #82158 from swiftlang/tsan-release-fix
[concurrency] Move tsan_release to point before task gets destroyed
2 parents 01f911a + 100a4e0 commit 665515c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

stdlib/public/Concurrency/Actor.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -256,8 +256,6 @@ void swift::runJobInEstablishedExecutorContext(Job *job) {
256256
#if SWIFT_OBJC_INTEROP
257257
objc_autoreleasePoolPop(pool);
258258
#endif
259-
260-
_swift_tsan_release(job);
261259
}
262260

263261
void swift::adoptTaskVoucher(AsyncTask *task) {

stdlib/public/Concurrency/TaskPrivate.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -854,6 +854,8 @@ struct AsyncTask::PrivateStorage {
854854
}
855855
}
856856

857+
_swift_tsan_release(task);
858+
857859
// Destroy and deallocate any remaining task local items since the task is
858860
// completed. We need to do this before we destroy the task local
859861
// deallocator.

0 commit comments

Comments
 (0)