[PATCH] D15380: [tsan] Update dispatch_group support to avoid using a disposed group object

Kuba Brecka via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 14 04:46:59 PST 2015


kubabrecka added inline comments.

================
Comment at: lib/tsan/rtl/tsan_libdispatch_mac.cc:100
@@ -90,3 +99,3 @@
   user_free(thr, pc, context);
 }
 
----------------
To detect racy-use-after-free, do we need to annotate all uses of the object (a dispatch group in this case) or is it okay to miss some?  Will that produce false positives?  Because here, the group is deallocated either by the explicit dispatch_retain on the main thread, or implicitly when the async block finishes.  I'm not sure how to write a reliable test that would catch the bug here.


http://reviews.llvm.org/D15380





More information about the llvm-commits mailing list