bisdn/rofl-core — pull request #31 by richardclegg (2014-08-09 01:42:46+00:00)
Title: Fix for invalid memory access when features_reply_rcvd caught a second time

I still can't figure out the precise reason but deleting ports like this causes valgrind to report
==27356== Invalid read of size 8
==27356== at 0x57E2CA0: std::_Rb_tree_increment(std::_Rb_tree_node_base*) (in
/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.19)
==27356== by 0x5436BDC: std::_Rb_tree_iterator >::operator++() (stl_tree.h:189)
==27356== by 0x5432F94: rofl::cofdptImpl::features_reply_rcvd(rofl::cofmsg_fe
atures_reply*) (cofdptImpl.cc:1095)
==27356== by 0x543025E: rofl::cofdptImpl::handle_message(rofl::cmemory*) (cof
dptImpl.cc:432)
==27356== by 0x542FCDE: rofl::cofdptImpl::handle_read(rofl::csocket*, int) (c
ofdptImpl.cc:335)
==27356== by 0x53ECDCD: rofl::csocket::handle_read(int) (csocket.h:423)
==27356== by 0x53EABE8: rofl::csocket::handle_revent(int) (csocket.cc:106)
==27356== by 0x53CEA2A: rofl::ciosrv::handle_rfds(std::list >&, int, fd_set*, fd_set*) (ciosrv.cc:722)
==27356== by 0x53CE6A3: rofl::ciosrv::handle(int, fd_set*, fd_set*, fd_set*)
(ciosrv.cc:668)

If the deletion works like that in the constructor valgrind is happy.