It's not OK to just turn off this checking for everyone. It's also not 
appropriate to blindly turn off all checks in a constructor or destructor. This 
also doesn't do the right thing for code invoked from a constructor or 
destructor.

Instead, I'd suggest you do the following:

 * When a complete object constructor starts for a polymorphic class type, 
write a record to a (thread-local) stack indicating the address, size, and 
type_info of the complete object.
 * When the sanitizer runtime detects a problem, check this side-table. If the 
access is to a subobject that would be present once the complete object is 
constructed, suppress the diagnostic (possibly based on a runtime flag).

http://reviews.llvm.org/D4528



_______________________________________________
cfe-commits mailing list
cfe-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to