[Boost-bugs] [Boost C++ Libraries] #7484: shared_memory_object does initialise m_mode in default ctor

Subject: [Boost-bugs] [Boost C++ Libraries] #7484: shared_memory_object does initialise m_mode in default ctor
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-10-08 16:35:03


#7484: shared_memory_object does initialise m_mode in default ctor
---------------------------------------------------------+------------------
 Reporter: Graham Hudspith <graham.hudspith@…> | Owner: igaztanaga
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: interprocess
  Version: Boost 1.51.0 | Severity: Problem
 Keywords: |
---------------------------------------------------------+------------------
 The default ctor for shared_memory_object does not initialise the m_mode
 member.

 I can't find an enum/#define for the "zero" value of mode_t, so I guess a
 simple:

 {{{

 inline shared_memory_object::shared_memory_object()
    : m_handle(file_handle_t(ipcdetail::invalid_file())),
       m_mode(0) // <--- this is the new line
 {}

 }}}

 would do the job.

 Reported to us when we run a static analysis program on our code which
 uses the boost interprocess library.

 This is against the 1.51.0 release of boost, but I've checked your svn
 trunk and it is still there.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/7484>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:10 UTC