Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-50127

Coverity analysis defect 116104: Using invalid iterator

    • Fully Compatible
    • ALL
    • Execution Team 2020-08-24

      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/db/catalog/multi_index_block.cpp:244: INVALIDATE_ITERATOR 116104 Function "end" creates an iterator.
      /src/mongo/db/catalog/multi_index_block.cpp:244: INVALIDATE_ITERATOR 116104 Assigning: "indexResumeInfo" = "std::find_if(resumeInfoIndexes.begin(), resumeInfoIndexes.end(), mongo::MultiIndexBlock::init(mongo::OperationContext *, mongo::Collection *, std::vector<mongo::BSONObj, std::allocator<mongo::BSONObj> > const &, std::function<mongo::Status (std::vector<mongo::BSONObj, std::allocator<mongo::BSONObj> > &)>, boost::optional<mongo::ResumeIndexInfo> const &)::[lambda(mongo::IndexSorterInfo const &) (instance 1)](info))".
      /src/mongo/db/catalog/multi_index_block.cpp:251: INVALIDATE_ITERATOR 116104 Dereferencing iterator "indexResumeInfo" though it is already past the end of its container.

            Assignee:
            benety.goh@mongodb.com Benety Goh
            Reporter:
            xgen-internal-coverity Coverity Collector User
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: