Subject: [Boost-bugs] [Boost C++ Libraries] #5251: boost graph seg faults inside gdb
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2011-03-01 15:23:43
#5251: boost graph seg faults inside gdb
-------------------------------+--------------------------------------------
Reporter: joao@⦠| Owner: asutton
Type: Bugs | Status: new
Milestone: To Be Determined | Component: graph
Version: Boost 1.42.0 | Severity: Problem
Keywords: graph num_edges |
-------------------------------+--------------------------------------------
I have a class with a boost graph member variable in it.
When I call a method from within gdb, to get the number of edges of a
graph, I get a segmentation fault.
I'm attaching a standalone code that reproduces it:
1. Enter GDB
2. Set a breakpoint on line number 34
3. From within GDB execute the following:
(a) p wrapper.dummy_.nedges()
(b) p dummy.nedges()
3a is fine, prints out 0 as it should be. The graph is empty.
3b seg faults though...
This is the resulting call stack:
#0 0x08049b90 in std::_List_const_iterator<boost::list_edge<void*,
boost::property<boost::edge_bundle_t, int, boost::no_property> >
>::operator++ (this=0xbffff6fc) at
/usr/include/c++/4.4/bits/stl_list.h:223
#1 0x08049427 in
std::__distance<std::_List_const_iterator<boost::list_edge<void*,
boost::property<boost::edge_bundle_t, int, boost::no_property> > > >
(__first=..., __last=...) at
/usr/include/c++/4.4/bits/stl_iterator_base_funcs.h:79
#2 0x08048ea3 in
std::distance<std::_List_const_iterator<boost::list_edge<void*,
boost::property<boost::edge_bundle_t, int, boost::no_property> > > >
(__first=..., __last=...) at
/usr/include/c++/4.4/bits/stl_iterator_base_funcs.h:114
#3 0x08048c12 in std::list<boost::list_edge<void*,
boost::property<boost::edge_bundle_t, int, boost::no_property> >,
std::allocator<boost::list_edge<void*,
boost::property<boost::edge_bundle_t, int, boost::no_property> > > >::size
(this=0xbffff7c4) at /usr/include/c++/4.4/bits/stl_list.h:805
#4 0x08048a3a in
boost::num_edges<boost::detail::adj_list_gen<boost::adjacency_list<boost::listS,
boost::listS, boost::undirectedS, int, int, boost::no_property,
boost::listS>, boost::listS, boost::listS, boost::undirectedS,
boost::property<boost::vertex_bundle_t, int, boost::no_property>,
boost::property<boost::edge_bundle_t, int, boost::no_property>,
boost::no_property, boost::listS>::config> (g_=...) at
/usr/include/boost/graph/detail/adjacency_list.hpp:978
#5 0x08048865 in dummy_class::nedges (this=0xbffff7c4) at graph.cxx:17
#6 <function called from gdb>
#7 dummy_method () at graph.cxx:34
#8 0x080488ea in main (argc=3, argv=0xbffff914) at graph.cxx:43
This is preventing us from using the graph reliably.
Using Ubuntu 10.10 with Boost 1.42.0 and G++ 4.4.4.
Reproduceable on Ubuntu 9.10 as well.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/5251> 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:05 UTC