Coverity analysis defect 134195: Using invalid iterator

XMLWordPrintableJSON

    • Query Optimization
    • Fully Compatible
    • ALL
    • v7.0
    • 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/s/write_ops/write_op.cpp:69: INVALIDATE_ITERATOR 134195 Function "end" creates an iterator.
      /src/mongo/s/write_ops/write_op.cpp:69: INVALIDATE_ITERATOR 134195 Assigning: "nonRetryableErr" = "std::find_if(errOps->begin(), errOps->end(), mongo::<unnamed>::getFirstNonRetryableError(std::vector<mongo::ChildWriteOp const *, std::allocator<mongo::ChildWriteOp const *> > const &)::[lambda(mongo::ChildWriteOp const *) (instance 1)]())".
      /src/mongo/s/write_ops/write_op.cpp:76: INVALIDATE_ITERATOR 134195 Dereferencing iterator "nonRetryableErr" though it is already past the end of its container.

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

                Created:
                Updated:
                Resolved: