Uploaded image for project: 'libzmq'
  1. libzmq
  2. LIBZMQ-312

stl iterator asserts in xrep_t::xrecv

    Details

    • Type: Bug
    • Status: Closed
    • Priority: 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

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            sustrik Martin Sustrik added a comment -

            Minimal test case is needed to reproduce the issue.

            Show
            sustrik Martin Sustrik added a comment - Minimal test case is needed to reproduce the issue.
            Hide
            laplantb 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
            laplantb 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
            laplantb Benoit Laplante added a comment -

            Unable to reproduce in 3.2.0

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

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: