[Boost-bugs] [Boost C++ Libraries] #7801: Access violation using edge function and stored_ra_edge_iter

Subject: [Boost-bugs] [Boost C++ Libraries] #7801: Access violation using edge function and stored_ra_edge_iter
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-12-17 17:08:23


#7801: Access violation using edge function and stored_ra_edge_iter
-------------------------------------------------------+--------------------
 Reporter: Geoff Hammerle <geoff.hammerle@…> | Owner: jewillco
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: graph
  Version: Boost 1.52.0 | Severity: Problem
 Keywords: |
-------------------------------------------------------+--------------------
 I declare an adjacency_list as follows:

 {{{
 struct MYvecS { };
 template <class ValueType>
 struct container_gen<MYvecS, ValueType>
 {
     typedef std::vector < ValueType, MyAllocator< ValueType > > type;
 };
 template <> struct parallel_edge_traits<MYvecS> { typedef
 allow_parallel_edge_tag type; };
 namespace detail
 {
     // allow random access to NXvecS stored elements
     template <> struct is_random_access<MYvecS> { enum { value = true };
 typedef mpl::true_ type; };
 }
 }}}



 {{{
 typedef boost::adjacency_list < MYvecS,
                                 MYvecS,
                                 boost::undirectedS,
                                 MYVertexType,
                                 MYEdgeType,
                                 no_property,
                                 MYvecS
> MyGraphType;
 }}}


 I begin populating the graph with vertices and edges. If I use the
 '''edge''' function, passing in two valid vertices that are in the graph,
 the call to '''StoredEdge(v)''' crashes.

 Referencing lines 312 thru 314 of '''detail\adjacency_list.hpp''', you'll
 see that when a single argument is passed to this method, the other two
 arguments assume default values. In this case '''edge_vec = 0''' and
 during this method call, it dereferences '''edge_vec''' which is set to
 NULL, and hence the access violation.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/7801>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:11 UTC