Boost C++ Libraries: Ticket #4895: Wrong temporary path determined by boost::interprocess::managed_shared_memory https://svn.boost.org/trac10/ticket/4895 <p> Creating a boost::interprocess::managed_shared_memory object (create_only) may determine a wrong temporary path for the shared memory file, if the COM environment has already been initialized for the current thread. </p> <p> The function inline bool <em>get_wmi_class_attribute( std::wstring&amp; strValue, const wchar_t *wmi_class, const wchar_t *wmi_class_var)</em> in the file <em>\boost\interprocess\detail\win32_api.hpp</em> doesn't always work correct. It gets called to fetch the last bootup time from WMI. The last bootup is then used to build the temporary path. </p> <p> The call to <a class="missing wiki">CoInitializeSecurity</a>(..) may fail due to various reasons, which are not always a failure. Eg. the <a class="missing wiki">CoInitializeSecurity</a>(..) has already been called with different settings (-&gt; HRESULT is 0x80010119). </p> <p> Remarks for the function mention above: </p> <ul><li>The <a class="missing wiki">CoInitialize</a>(..) / <a class="missing wiki">CoUninitialize</a>(..) call have to be balanced (with RAII). </li><li>Also the <a class="missing wiki">CoCreateInstance</a>(..) / Release(..) calls have to be balanced. </li></ul><blockquote class="citation"> <blockquote class="citation"> <p> Both are constraints are broken due to the several early returns. </p> </blockquote> </blockquote> <ul><li>Also the call to <a class="missing wiki">CoInitialize</a> may fail - how to deal with that? </li></ul> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/4895 Trac 1.4.3 anonymous Thu, 23 Dec 2010 19:58:46 GMT <link>https://svn.boost.org/trac10/ticket/4895#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/4895#comment:1</guid> <description> <p> This may be related to <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/4907" title="#4907: Bugs: message queue temp dir inconsistent if WMI calls fail. (closed: fixed)">ticket:4907</a>. </p> <p> Please fix this in boost 1.46 if possible. Or post a patch here and I'll be happy to test it on Windows 7 and Windows XP. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>anonymous</dc:creator> <pubDate>Thu, 23 Dec 2010 20:05:07 GMT</pubDate> <title>severity, milestone changed https://svn.boost.org/trac10/ticket/4895#comment:2 https://svn.boost.org/trac10/ticket/4895#comment:2 <ul> <li><strong>severity</strong> <span class="trac-field-old">Problem</span> → <span class="trac-field-new">Showstopper</span> </li> <li><strong>milestone</strong> <span class="trac-field-old">To Be Determined</span> → <span class="trac-field-new">Boost 1.46.0</span> </li> </ul> Ticket Ion Gaztañaga Sun, 26 Dec 2010 10:16:08 GMT <link>https://svn.boost.org/trac10/ticket/4895#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/4895#comment:3</guid> <description> <p> Please try SVN for recent changes. I've balanced all calls and the code supports already initialized security. I'm not an expert in COM issues, so I would need some help with this issue. Thanks for the report. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Marshall Clow</dc:creator> <pubDate>Thu, 20 Jan 2011 00:50:24 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/4895#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/4895#comment:4</guid> <description> <p> So, is this fixed or not? Does anyone know? </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Ion Gaztañaga</dc:creator> <pubDate>Fri, 01 Apr 2011 17:57:58 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/4895#comment:5 https://svn.boost.org/trac10/ticket/4895#comment:5 <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> WMI is provoking a lot of problems for Boost Interprocess users. I've decided to remove bootstamp use in windows to obtain kernel persistence in Windows. This means that windows shared memory/queues will survive to reboots, but this behaviour is allowed by POSIX. Using bootstamps to detect reboots is doing more harm than good. </p> <p> WMI is removed in Boost 1.47 </p> Ticket Kai K. Thu, 21 Jul 2011 11:36:58 GMT <link>https://svn.boost.org/trac10/ticket/4895#comment:6 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/4895#comment:6</guid> <description> <p> Since WMI usage was not removed for 1.47.0 please have a look at my additions to <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/5392" title="#5392: Bugs: Message queue temporary dir named &#34;Select LastBootUpTime from ... (closed: fixed)">#5392</a>! </p> </description> <category>Ticket</category> </item> <item> <dc:creator>anonymous</dc:creator> <pubDate>Fri, 22 Jul 2011 12:25:13 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/4895#comment:7 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/4895#comment:7</guid> <description> <p> This has not been fixed in Boost 1.47.0. The svn versions have had this fix for quite some time now. </p> </description> <category>Ticket</category> </item> </channel> </rss>