libzmq
  1. libzmq
  2. LIBZMQ-312

stl iterator asserts in xrep_t::xrecv

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 3.1.0
    • Fix Version/s: 3.2.0
    • Component/s: core
    • Labels:
      None
    • Environment:

      Visual Studio 2010, Debug configuration

      Description

      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

      1. TestZMQ.cpp
        2 kB
        Benoit Laplante

        Activity

        Hide
        Martin Sustrik added a comment -

        Minimal test case is needed to reproduce the issue.

        Show
        Martin Sustrik added a comment - Minimal test case is needed to reproduce the issue.
        Hide
        Benoit Laplante added a comment -

        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.

        Show
        Benoit Laplante added a comment - 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.
        Hide
        Benoit Laplante added a comment -

        Unable to reproduce in 3.2.0

        Show
        Benoit Laplante added a comment - Unable to reproduce in 3.2.0

          People

          • Assignee:
            Martin Sustrik
            Reporter:
            Benoit Laplante
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: