[SERVER-65660] Coverity analysis defect 122084: Unsafe assignment operator Created: 14/Apr/22  Updated: 29/Oct/23  Resolved: 16/Jun/22

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 6.1.0-rc0

Type: Bug Priority: Major - P3
Reporter: Coverity Collector User Assignee: Jordi Olivares Provencio
Resolution: Fixed Votes: 0
Labels: coverity
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File Screen Shot 2022-04-14 at 8.49.22 AM.png    
Issue Links:
Problem/Incident
is caused by SERVER-63825 Report metrics for read/write queues Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Execution Team 2022-06-27
Participants:

 Description   

Unsafe assignment operator

This user-written assignment operator does not check for self-assignment. If an object of this type is assigned to itself use-after-free errors may occur if the class owns resources. Assignment operator does not check for self-assignment
/src/mongo/util/concurrency/ticket.h:56: SELF_ASSIGN 122084 No protection against the object assigning to itself.



 Comments   
Comment by Githook User [ 16/Jun/22 ]

Author:

{'name': 'Jordi Olivares Provencio', 'email': 'jordi.olivares-provencio@mongodb.com', 'username': 'jordiolivares'}

Message: SERVER-65660 Protect Ticket against self assignment
Branch: master
https://github.com/mongodb/mongo/commit/b9852f174f6a165496dfad4b21279c71ca64cda3

Comment by Kyle Suarez [ 14/Apr/22 ]

I am not sure why the assignee was changed. Sending it back to Storage Execution.

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