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

Coverity analysis defect 99885: Using invalid iterator

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 3.4.0-rc0
    • Affects Version/s: None
    • Component/s: Sharding
    • Fully Compatible
    • ALL
    • Sharding 2016-10-10

      An invalid or past-the-end iterator is being used

      Defect 99885 (STATIC_C)
      Checker INVALIDATE_ITERATOR (subcategory none)
      File: /src/mongo/s/balancer/migration_manager.cpp
      Function mongo::MigrationManager::finishRecovery(mongo::OperationContext *, const mongo::OID &, unsigned long, const mongo::MigrationSecondaryThrottleOptions &, bool)
      /src/mongo/s/balancer/migration_manager.cpp, line: 391
      "erase" invalidates iterator "std::__cxx11::list<mongo::MigrateInfo, std::allocator<mongo::MigrateInfo> >::const_iterator(itMigrateInfo)".

                          itMigrateInfo = nssAndMigrateInfos.second.erase(itMigrateInfo);
      

      /src/mongo/s/balancer/migration_manager.cpp, line: 391
      Using invalid iterator "std::__cxx11::list<mongo::MigrateInfo, std::allocator<mongo::MigrateInfo> >::const_iterator(itMigrateInfo)".

                          itMigrateInfo = nssAndMigrateInfos.second.erase(itMigrateInfo);
      

            Assignee:
            kaloian.manassiev@mongodb.com Kaloian Manassiev
            Reporter:
            xgen-internal-coverity Coverity Collector User
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: