Coverity analysis defect 155588: Using invalid iterator

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 8.1.0-rc0, 8.0.10, 7.0.22
    • Affects Version/s: None
    • Component/s: None
    • None
    • Service Arch
    • Fully Compatible
    • ALL
    • v8.0, v7.0
    • Networking & Obs 2024-08-05
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Using invalid iterator

      Undefined behavior may result; the program may crash or subtly misbehave. An invalid or past-the-end iterator is being used
      /src/mongo/client/connpool.cpp:487: INVALIDATE_ITERATOR 155588 Calling "find" with element "host" returns the end iterator.
      /src/mongo/client/connpool.cpp:487: INVALIDATE_ITERATOR 155588 Assigning: "<temporary>" = "this->_pools.find(mongo::DBConnectionPool::PoolKey(host, timeout))".
      /src/mongo/client/connpool.cpp:487: INVALIDATE_ITERATOR 155588 Dereferencing iterator "this->_pools.find(mongo::DBConnectionPool::PoolKey(host, timeout))" though it is already past the end of its container.

              Assignee:
              Amirsaman Memaripour
              Reporter:
              Coverity Collector User
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: