Peer::add_link (this=0x8077398, dest=0x80f6630)
at /usr/include/c++/4.2/bits/stl_deque.h:1055
1055 if (this->_M_impl._M_finish._M_cur
(gdb) s
56 p_out_links.push_back(new Link(this, dest));
(gdb) s
1055 if (this->_M_impl._M_finish._M_cur
(gdb) s
107 { ::new(__p) _Tp(__val); }
(gdb) s
1059 ++this->_M_impl._M_finish._M_cur;
(gdb) s
307 _M_t._M_insert_unique(__x);
(gdb) s
1062 _M_push_back_aux(__x);
(gdb) s
307 _M_t._M_insert_unique(__x);
(gdb) s
std::_Rb_tree<Peer*, Peer*, std::_Identity<Peer*>, std::less<Peer*>, std::allocator<Peer*> >::_M_insert_unique (this=0x80f6708, __v=@0xbfeb2948)
at /usr/include/c++/4.2/bits/stl_tree.h:475
475 { returnstatic_cast<_Link_type>(this->_M_impl._M_header._M_parent); }
(gdb) s
486 { returnstatic_cast<_Link_type>(&this->_M_impl._M_header); }
(gdb) s
977 while (__x != 0)
(gdb) s
486 { returnstatic_cast<_Link_type>(&this->_M_impl._M_header); }
(gdb) s
606 (this->_M_impl._M_header._M_left));
(gdb) s
985 if (__j == begin())
(gdb) s
606 (this->_M_impl._M_header._M_left));
(gdb) s
985 if (__j == begin())
(gdb) s
198 _M_node = _Rb_tree_decrement(_M_node);
(gdb) s
Program received signal SIGSEGV, Segmentation fault.
0xb7ecf174 in std::_Rb_tree_decrement () from /usr/lib/libstdc++.so.6
(gdb) s
Single stepping until exit from function _ZSt18_Rb_tree_decrementPSt18_Rb_tree_node_base,
which has no line number information.
Program terminated with signal SIGSEGV, Segmentation fault.
The program no longer exists.
the fatal error arise:
No source available for "std::_Rb_tree_decrement() "
You're producing a segmentation fault while adding or removing something from a map or set. These kind of errors never trigger at the line that caused them, but somewhere deeper in the call stack, or when another change is made to the structure, e.g. after a number of insertions into the tree. In this case, the error triggers in the library's implementation of the red-black tree, either at the same moment that you tried to add or remove something, or some steps later. I'll need to see your code, specially the types the set or map is holding, to tell you that's causing the error.
class Link
{
PPeer l_to; ///< Receiver peer
LinksStats l_stats; ///< Link statistics (app. dependent, so a separate class)
public:
/// Constructor, with source and target peers as parameters.
Link(PPeer from, PPeer to);
inline PPeer to() { ///< The destination peer of the link
return l_to;
};
/// A pointer to the link's LinksStats record, used to maintain
/// purely statistical information about the link and, say, chunk
/// flows along it.
PLinkStats stats();
/// Clear any simulation or statistics data associated with the link.
/// Called for each link when the Overlay::clear() method is called.
void clear();
};
Link::Link(PPeer from, PPeer to) : l_to(to) {};