AMDG On 09/16/2011 12:52 PM, Howard Hinnant wrote: > Author: hhinnant > Date: Fri Sep 16 14:52:23 2011 > New Revision: 139933 > > URL: http://llvm.org/viewvc/llvm-project?rev=139933&view=rev > Log: > Doug Gregor pointed out some problems with debug mode enabled in one TU and > not another. This patch helps detect those situations and offers improved > error messages to help get debug mode enabled in more TU's when it is > absolutely necessary to do so. Thanks Doug. >
Okay, so this handles cases where the container/iterator is constructed without debug information, and used with it. What about when a container is constructed with debug information, and destroyed without it? Will the dangling pointer in the database cause any problems other than the obvious memory leak? > > __i_node* i = __find_iterator(__i); > - return i != nullptr ? (i->__c_ != nullptr ? i->__c_->__c_ : nullptr) : > nullptr; > + _LIBCPP_ASSERT(i != nullptr, "iterator constructed in translation unit > with debug mode not enabled." > + " #define _LIBCPP_DEBUG2 1 for that translation unit."); > + return i->__c_ != nullptr ? i->__c_->__c_ : nullptr; > } > <snip> > In Christ, Steven Watanabe
signature.asc
Description: OpenPGP digital signature
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
