[all-commits] [llvm/llvm-project] 00617c: [Darwin][TSan] Fix false positive race report when...
Dan Blackwell via All-commits
all-commits at lists.llvm.org
Tue Jun 30 06:21:21 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 00617c92e10fb55be86e6fcf60ef2f5717d8eb92
https://github.com/llvm/llvm-project/commit/00617c92e10fb55be86e6fcf60ef2f5717d8eb92
Author: Dan Blackwell <dan_blackwell at apple.com>
Date: 2026-06-30 (Tue, 30 Jun 2026)
Changed paths:
M compiler-rt/lib/tsan/rtl/tsan_interceptors_libdispatch.cpp
A compiler-rt/test/tsan/Darwin/dispatch_apply.mm
Log Message:
-----------
[Darwin][TSan] Fix false positive race report when using dispatch_apply (#204866)
Currently I have seen some false positive race reports caused by
instrumented block copy code that writes after the release-annotation.
When the block runs on another thread and reads the copied data, it
incorrectly reports this as a race.
This patch casts the block to a `void *` in order to avoid the block
copy - thus avoiding the reported race. This is safe because
`dispatch_apply` runs synchronously, so the block lives beyond all
invocations.
rdar://92286127
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list