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

Coverity analysis defect 73571: Unsafe assignment operator

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: Major - P3 Major - P3
    • None
    • None
    • Testing Infrastructure
    • Fully Compatible
    • ALL

    Description

      Assignment operator does not check for self-assignment

      Defect 73571 (STATIC_C)
      Checker SELF_ASSIGN (subcategory none)
      File: /src/mongo/s/query/cluster_cursor_manager.cpp
      Function mongo::ClusterCursorManager::PinnedCursor::operator =(mongo::ClusterCursorManager::PinnedCursor&&)
      /src/mongo/s/query/cluster_cursor_manager.cpp, line: 101
      No protection against the object assigning to itself.

              _manager = std::move(other._manager);

      Attachments

        Activity

          People

            Unassigned Unassigned
            xgen-internal-coverity Coverity Collector User
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: