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

Coverity analysis defect 120375: Uninitialized scalar field

    • Type: Icon: Bug Bug
    • Resolution: Works as Designed
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
    • ALL
    • Execution Team 2021-09-06

      Uninitialized scalar field

      The field will contain an arbitrary value left over from earlier computations. A scalar field is not initialized by the constructor
      /src/mongo/bson/util/simple8b.h:272: UNINIT_CTOR 120375 Class member declaration for "_current".
      /src/mongo/bson/util/simple8b.cpp:661: UNINIT_CTOR 120375 Non-static class member "_current" is not initialized in this constructor nor in any functions that it calls.
      /src/mongo/bson/util/simple8b.h:277: UNINIT_CTOR 120375 Class member declaration for "_mask".
      /src/mongo/bson/util/simple8b.cpp:661: UNINIT_CTOR 120375 Non-static class member "_mask" is not initialized in this constructor nor in any functions that it calls.
      /src/mongo/bson/util/simple8b.h:287: UNINIT_CTOR 120375 Class member declaration for "_bitsPerValue".
      /src/mongo/bson/util/simple8b.cpp:661: UNINIT_CTOR 120375 Non-static class member "_bitsPerValue" is not initialized in this constructor nor in any functions that it calls.
      /src/mongo/bson/util/simple8b.h:291: UNINIT_CTOR 120375 Class member declaration for "_countMask".
      /src/mongo/bson/util/simple8b.cpp:661: UNINIT_CTOR 120375 Non-static class member "_countMask" is not initialized in this constructor nor in any functions that it calls.
      /src/mongo/bson/util/simple8b.h:294: UNINIT_CTOR 120375 Class member declaration for "_countBits".
      /src/mongo/bson/util/simple8b.cpp:661: UNINIT_CTOR 120375 Non-static class member "_countBits" is not initialized in this constructor nor in any functions that it calls.
      /src/mongo/bson/util/simple8b.h:297: UNINIT_CTOR 120375 Class member declaration for "_countMultiplier".
      /src/mongo/bson/util/simple8b.cpp:661: UNINIT_CTOR 120375 Non-static class member "_countMultiplier" is not initialized in this constructor nor in any functions that it calls.
      /src/mongo/bson/util/simple8b.h:300: UNINIT_CTOR 120375 Class member declaration for "_selector".
      /src/mongo/bson/util/simple8b.cpp:661: UNINIT_CTOR 120375 Non-static class member "_selector" is not initialized in this constructor nor in any functions that it calls.
      /src/mongo/bson/util/simple8b.h:303: UNINIT_CTOR 120375 Class member declaration for "_extensionType".
      /src/mongo/bson/util/simple8b.cpp:661: UNINIT_CTOR 120375 Non-static class member "_extensionType" is not initialized in this constructor nor in any functions that it calls.

            Assignee:
            henrik.edin@mongodb.com Henrik Edin
            Reporter:
            xgen-internal-coverity Coverity Collector User
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: