[SERVER-28904] Coverity analysis defect 101500: Non-virtual destructor Created: 21/Apr/17  Updated: 30/Oct/23  Resolved: 21/Apr/17

Status: Closed
Project: Core Server
Component/s: Querying
Affects Version/s: None
Fix Version/s: 3.5.7

Type: Bug Priority: Major - P3
Reporter: Coverity Collector User Assignee: Tess Avitabile (Inactive)
Resolution: Fixed Votes: 0
Labels: coverity
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Query 2017-05-08
Participants:

 Description   

The correct derived class destructor is not invoked due to the absence of a virtual destructor in the base class

Defect 101500 (STATIC_C)
Checker VIRTUAL_DTOR (subcategory none)
File: /src/mongo/db/update/update_object_node.h
Function mongo::UpdateObjectNode::~UpdateObjectNode()
/src/mongo/db/update/update_object_node.h, line: 41
Class "mongo::UpdateObjectNode" has a destructor and a pointer to it is upcast to class "mongo::UpdateNode" which doesn't have a virtual destructor.

    class UpdateObjectNode : public UpdateNode {



 Comments   
Comment by Githook User [ 21/Apr/17 ]

Author:

{u'username': u'tessavitabile', u'name': u'Tess Avitabile', u'email': u'tess.avitabile@mongodb.com'}

Message: SERVER-28904 UpdateNode should have a virtual destructor
Branch: master
https://github.com/mongodb/mongo/commit/9b7d79e1cc8b8a233ea17072fb93c8cf5c42f039

Generated at Thu Feb 08 04:19:23 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.