[cfe-dev] Invalidated Iterator Project

Jim Goodnow II jim at thegoodnows.net
Fri Sep 10 03:43:56 PDT 2010


The problem is that some of the operations can be successful 99 times 
out of a hundred. The debugging version may never see the 1 time out 
of a hundred. For example, when you insert a value in a vector, if 
there is enough space reserved, the iterator will still be valid. 
Only if the memory is re-allocated, will the iterator be invalidated. 
So, while a debugging version might never experience the problem, the 
final executable might under the right conditions. One of the points 
of static analysis is to discover potential problems that may only 
occur under the precise conditions by analyzing all realizable paths 
and detecting possible problems.

  - jim

At 03:25 AM 9/10/2010, Christopher Jefferson wrote:

>On 9 Sep 2010, at 10:58, Jim Goodnow II wrote:
>
> > Hi,
> >
> > I'm new to the Clang dev list and will be working on adding static
> > analysis checking for C++. I've been doing a lot of reading of the
> > existing code and am ready to start coding. It would be very useful
> > to get some feedback and suggestions on implementation.
>
>What are the advantages over adding this code into a debugging 
>version of the standard library, such as the ones contained in both 
>VC++ and g++?
>
>Chris




More information about the cfe-dev mailing list