[PATCH] D59138: [TSan][libdispatch] Add missing interceptor
Julian Lettner via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 8 09:32:42 PST 2019
yln created this revision.
Herald added subscribers: llvm-commits, Sanitizers, kubamracek.
Herald added projects: Sanitizers, LLVM.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D59138
Files:
compiler-rt/lib/tsan/rtl/tsan_libdispatch.cc
Index: compiler-rt/lib/tsan/rtl/tsan_libdispatch.cc
===================================================================
--- compiler-rt/lib/tsan/rtl/tsan_libdispatch.cc
+++ compiler-rt/lib/tsan/rtl/tsan_libdispatch.cc
@@ -322,9 +322,15 @@
return result;
}
+TSAN_INTERCEPTOR(void, dispatch_group_enter, dispatch_group_t group) {
+ SCOPED_TSAN_INTERCEPTOR(dispatch_group_enter, group);
+ Acquire(thr, pc, (uptr)group);
+ REAL(dispatch_group_enter)(group);
+}
+
TSAN_INTERCEPTOR(void, dispatch_group_leave, dispatch_group_t group) {
SCOPED_TSAN_INTERCEPTOR(dispatch_group_leave, group);
- // Acquired in the group noticifaction callback in dispatch_group_notify[_f].
+ // Acquired in the group notification callback in dispatch_group_notify[_f].
Release(thr, pc, (uptr)group);
REAL(dispatch_group_leave)(group);
}
@@ -739,6 +745,7 @@
INTERCEPT_FUNCTION(dispatch_semaphore_signal);
INTERCEPT_FUNCTION(dispatch_semaphore_wait);
INTERCEPT_FUNCTION(dispatch_group_wait);
+ INTERCEPT_FUNCTION(dispatch_group_enter);
INTERCEPT_FUNCTION(dispatch_group_leave);
INTERCEPT_FUNCTION(dispatch_group_async);
INTERCEPT_FUNCTION(dispatch_group_async_f);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D59138.189872.patch
Type: text/x-patch
Size: 1177 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190308/59aed856/attachment.bin>
More information about the llvm-commits
mailing list