Boost logo

Boost Users :

From: Stephen Torri (storri_at_[hidden])
Date: 2007-04-03 22:27:39


On Wed, 2007-04-04 at 04:33 +0300, Peter Dimov wrote:
> > Address 0x4389BC0 is 8 bytes inside a block of size 60 alloc'd
>
> > by 0x41968E1:
> > libreverse::infrastructure::Formula_Parser::get_Graph(std::string,
> > std::string) (Formula_Parser.cpp:110)
>
> Line 110 seems correct, but the part of the Graph object at offset 8 is
> never initialized for some reason, if I read Valgrind's output correctly.

All that Graph object has is a Graph_t object and a IdVertexMap_t
object. They are part of object.

        class Graph {
        public:
               typedef property< vertex_index_t,
                                  uint32_t,
                                  property< vertex_name_t,
                                            boost::shared_ptr<Component> > >
                VertexProperty_t;
        
                typedef adjacency_list<setS, // OutEdgeList
                                       setS, // VertexList
                                       directedS, // Directed
                                       VertexProperty_t> // VertexProperties
                Graph_t;
        
                typedef std::map<uint32_t, Vertex_t> IdVertexMap_t;
        
                Graph(){}
        
                ... Missing accessor functions for adding, retrieving or deleting Component objects ...
        
                Graph_t m_graph;
        
                IdVertexMap_t;
        }
        
I don't initialize these objects in the constructor since both are
objects that should be okay as empty containers.

Stephen


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net