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

Coverity analysis defect 105094: Uninitialized scalar field

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 4.0.5, 4.1.6
    • Internal Code
    • Fully Compatible
    • ALL
    • v4.0
    • Security 2018-11-19

    Description

      A scalar field is not initialized by the constructor

      Defect 105094 (STATIC_C)
      Checker UNINIT_CTOR (subcategory none)
      File: /src/mongo/db/free_mon/free_mon_queue.h
      Function mongo::FreeMonMessageQueue::FreeMonMessageQueue(bool)
      /src/mongo/db/free_mon/free_mon_queue.h, line: 150
      Class member declaration for "_counter".

              uint64_t _counter;

      /src/mongo/db/free_mon/free_mon_queue.h, line: 106
      Non-static class member "_counter" is not initialized in this constructor nor in any functions that it calls.

              FreeMonMessageQueue(bool useCrankForTest = false) : _useCrank(useCrankForTest) {}

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: