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

Coverity analysis defect 101805: Non-virtual destructor

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 3.5.11
    • Affects Version/s: None
    • Component/s: Internal Code
    • Labels:
    • Fully Compatible
    • ALL
    • Platforms 2017-07-31

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

      Defect 101805 (STATIC_C)
      Checker VIRTUAL_DTOR (subcategory none)
      File: /src/mongo/db/modules/enterprise/src/watchdog/watchdog.h
      Function mongo::DirectoryCheck::~DirectoryCheck()
      /src/mongo/db/modules/enterprise/src/watchdog/watchdog.h, line: 62
      Class "mongo::DirectoryCheck" has a destructor and a pointer to it is upcast to class "mongo::WatchdogCheck" which doesn't have a virtual destructor.

          class DirectoryCheck : public WatchdogCheck {
      

            Assignee:
            mark.benvenuto@mongodb.com Mark Benvenuto
            Reporter:
            xgen-internal-coverity Coverity Collector User
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: