[cfe-commits] [libcxx] r139933 - in /libcxx/trunk: include/__debug include/iterator src/debug.cpp
David Blaikie
dblaikie at gmail.com
Fri Sep 16 13:59:15 PDT 2011
On Fri, Sep 16, 2011 at 1:48 PM, Howard Hinnant <hhinnant at apple.com> wrote:
> 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.
>
You could potentially flag any outstanding iterators as invalid, though that
would presumably require extra state tracking you don't already have
(increasing the memory footprint of the database).
- David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20110916/dee68978/attachment.html>
More information about the cfe-commits
mailing list