[cfe-commits] [libcxx] r139933 - in /libcxx/trunk: include/__debug include/iterator src/debug.cpp

Howard Hinnant hhinnant at apple.com
Fri Sep 16 13:48:00 PDT 2011


On Sep 16, 2011, at 4:43 PM, Steven Watanabe wrote:

> 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?

If another container gets constructed at the same address, then there will be a collision in the database.  I could probably put some checks in to detect that situation.  Maybe just silently reuse the database entry in that case.

Howard




More information about the cfe-commits mailing list