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

Coverity analysis defect 99631: Unsafe assignment operator

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.3.9
    • Component/s: Sharding
    • Labels:
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Sprint:
      Sharding 16 (06/24/16)

      Description

      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;

        Attachments

          Activity

            People

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

              Dates

              Created:
              Updated:
              Resolved: