dvyukov added inline comments.

================
Comment at: lib/CodeGen/CodeGenFunction.cpp:717
 
+  // Ignore TSan memory acesses from within dealloc and all of its calees at
+  // run time.
----------------
This is unpleasant. We had recursive ignores in the old Valgrind-based tsan, 
but managed to not reintroduce them in the new tsan so far. But I also don't 
see any better solution.



================
Comment at: lib/CodeGen/CodeGenFunction.cpp:721
+    if (const auto *M = dyn_cast_or_null<ObjCMethodDecl>(D))
+      if (M->getMethodFamily() == OMF_dealloc)
+        Fn->addFnAttr("sanitize_thread_no_checking_at_run_time");
----------------
Can we do this check right in the tsan pass? Or this information is already 
lost there?


================
Comment at: lib/CodeGen/CodeGenFunction.cpp:722
+      if (M->getMethodFamily() == OMF_dealloc)
+        Fn->addFnAttr("sanitize_thread_no_checking_at_run_time");
+
----------------
Also do:
   Fn->removeFnAttr(llvm::Attribute::SanitizeThread);
That's what will effectively happen. And it will allow to simplify the other 
patch.


https://reviews.llvm.org/D25857



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to