Coverity analysis defect 99631: Unsafe assignment operator

XMLWordPrintableJSON

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

      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
            Reporter:
            Coverity Collector User
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: