Uploaded image for project: 'C++ Driver'
  1. C++ Driver
  2. CXX-1892

Coverity analysis defect 105006: Uninitialized scalar field

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Gone away
    • Icon: Minor - P4 Minor - P4
    • None
    • None
    • None
    • None

    Description

      A scalar field is not initialized by the constructor

      Defect 105006 (STATIC_C)
      Checker UNINIT_CTOR (subcategory none)
      File: /src/bsoncxx/private/stack.hh
      Function bsoncxx::v_noabi::stack<bsoncxx::v_noabi::builder::core::impl::frame, (unsigned long)4>::stack()
      /usr/include/c++/7/type_traits, line: 2046
      Class member declaration for "__align".

          	struct __attribute__((__aligned__((_Align)))) { } __align;

      /src/bsoncxx/private/stack.hh, line: 31
      Non-static class member field "object_memory._align" is not initialized in this constructor nor in any functions that it calls.

              stack() : _bucket_index(0), _bucket_size(size), _is_empty(true) {}

      Attachments

        Activity

          People

            Unassigned Unassigned
            xgen-internal-coverity Coverity Collector User
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: