[SERVER-19828] Coverity analysis defect 73571: Unsafe assignment operator Created: 07/Aug/15  Updated: 07/Aug/15  Resolved: 07/Aug/15

Status: Closed
Project: Core Server
Component/s: Testing Infrastructure
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Coverity Collector User Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: coverity
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Operating System: ALL
Participants:

 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);



 Comments   
Comment by J Rassi [ 07/Aug/15 ]

Not a bug, per discussion with Drew.

Generated at Thu Feb 08 03:52:12 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.