stl iterator asserts in xrep_t::xrecv
Description
Environment
Visual Studio 2010, Debug configuration
Attachments
1
Activity
Show:

Benoit Laplante June 5, 2012 at 3:51 PM
Unable to reproduce in 3.2.0

Benoit Laplante January 29, 2012 at 4:17 PM
Sorry, I found this obvious just by reading the code: do not use an iterator if it has been erased. I attached the same test case as LIBZMQ-311. More precisely it breaks in stl file xtree line 322. Using Visual Studio 2010 Debug x64 configuration.

Martin Sustrik January 29, 2012 at 2:11 AM
Minimal test case is needed to reproduce the issue.
Behaviour: on line 235 of file xrep.cpp, the stl iterator asserts on an invalid iterator and abort.
Why? on line 227, on post erase, the iterator becomes invalid and must be reassign or never use again.
workaround : comment line 235