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

Coverity analysis defect 99631: Unsafe assignment operator

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 3.3.9
    • Affects Version/s: None
    • Component/s: Sharding
    • Fully Compatible
    • ALL
    • Sharding 16 (06/24/16)

      Assignment operator does not check for self-assignment

      Defect 99631 (STATIC_C)
      Checker SELF_ASSIGN (subcategory none)
      File: /src/mongo/db/s/active_migrations_registry.cpp
      Function mongo::ScopedRegisterMigration::operator =(mongo::ScopedRegisterMigration&&)
      /src/mongo/db/s/active_migrations_registry.cpp, line: 98
      No protection against the object assigning to itself.

              _registry = other._registry;
      

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

              Created:
              Updated:
              Resolved: