On Fri, Sep 16, 2011 at 1:48 PM, Howard Hinnant <[email protected]> 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
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to