[SERVER-70229] Coverity analysis defect 133860: Missing assignment operator Created: 05/Oct/22  Updated: 29/Oct/23  Resolved: 22/Nov/22

Status: Closed
Project: Core Server
Component/s: Internal Code
Affects Version/s: None
Fix Version/s: 6.2.0-rc0, 6.3.0-rc0

Type: Bug Priority: Major - P3
Reporter: Coverity Collector User Assignee: Martin Neupauer
Resolution: Fixed Votes: 0
Labels: coverity, pm2697-m4
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File Screen Shot 2022-10-05 at 10.02.28 AM.png    
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: QE 2022-10-17, QE 2022-10-31, QE 2022-11-14, QE 2022-11-28
Participants:
Story Points: 1

 Description   

Missing assignment operator

This class, which frees resources in its destructor, does not have a user-written copy assignment operator, but is copy-assigned. Unless the resource is managed separately from the copy operation, this will cause use-after-free errors. Class that owns resources lacks a user-written assignment operator
/src/mongo/db/exec/sbe/vm/vm.h:862: MISSING_COPY_OR_ASSIGN 133860 Class "mongo::sbe::vm::ByteCode" owns resources that are freed in its destructor but has no user-written copy constructor.



 Comments   
Comment by Githook User [ 15/Nov/22 ]

Author:

{'name': 'Martin Neupauer', 'email': 'xmaton@messengeruser.com'}

Message: SERVER-70229 delete special member functions
Branch: master
https://github.com/mongodb/mongo/commit/6cdad7c65db24d28d5f7b26ea7cece1495ac3dff

Comment by Martin Neupauer [ 15/Nov/22 ]

https://github.com/10gen/mongo/pull/8753

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