[PATCH] D12712: Implementation and testing for poisoning vtable ptr in dtor.

Evgeniy Stepanov via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 8 17:00:35 PDT 2015


eugenis added inline comments.

================
Comment at: lib/CodeGen/CGClass.cpp:1671
@@ -1670,1 +1670,3 @@
 
+      ASTContext &Context = CGF.getContext();
+      // Poison vtable and vtable ptr if they exist for this class.
----------------
You are poisoning the vtable pointer in the base destructor.
Isn't that too early?
For example, in the following case the vptr would be poisoned before ~A, right?
https://github.com/google/sanitizers/wiki/ThreadSanitizerPopularDataRaces#data-race-on-vptr



http://reviews.llvm.org/D12712





More information about the cfe-commits mailing list