Boost C++ Libraries: Ticket #7484: shared_memory_object does not initialise m_mode in default ctor https://svn.boost.org/trac10/ticket/7484 <p> The default ctor for shared_memory_object does not initialise the m_mode member. </p> <p> I can't find an enum/#define for the "zero" value of mode_t, so I guess a simple: </p> <pre class="wiki"> inline shared_memory_object::shared_memory_object() : m_handle(file_handle_t(ipcdetail::invalid_file())), m_mode(0) // &lt;--- this is the new line {} </pre><p> would do the job. </p> <p> Reported to us when we run a static analysis program on our code which uses the boost interprocess library. </p> <p> This is against the 1.51.0 release of boost, but I've checked your svn trunk and it is still there. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/7484 Trac 1.4.3 graham.hudspith@… Tue, 09 Oct 2012 07:35:12 GMT summary changed https://svn.boost.org/trac10/ticket/7484#comment:1 https://svn.boost.org/trac10/ticket/7484#comment:1 <ul> <li><strong>summary</strong> <span class="trac-field-old">shared_memory_object does initialise m_mode in default ctor</span> → <span class="trac-field-new">shared_memory_object does not initialise m_mode in default ctor</span> </li> </ul> Ticket Ion Gaztañaga Thu, 10 Jan 2013 20:06:26 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/7484#comment:2 https://svn.boost.org/trac10/ticket/7484#comment:2 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/82434" title="Fixes #7484">[82434]</a>) Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/7484" title="#7484: Bugs: shared_memory_object does not initialise m_mode in default ctor (closed: fixed)">#7484</a> </p> Ticket