Boost C++ Libraries: Ticket #4677: [filesystem] V3 filesystem::path corrupted if constructed from a local buffer https://svn.boost.org/trac10/ticket/4677 <p> With V3 filesystem in 1.44.0, boost::filesystem::remove_all() crashes if invoked with a block-local (automatic storage duration) TCHAR [] buffer for the pathname. </p> <p> Looks like a filesystem::path constructed this way is corrupted. The attached example creates 3 nested directories in %TEMP% and attempts to remove them. On Windows with Visual Studio 2008 this crashes with 'bad allocation' </p> <p> If the path is constructed from a string/wstring, or if an actual pointer is used to invoke remove_all(), than all is fine and no crash occurs. </p> <p> To run the sample code just create an empty VC++ project and add the .cpp to it. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/4677 Trac 1.4.3 terminatorul@… Wed, 22 Sep 2010 20:40:22 GMT attachment set https://svn.boost.org/trac10/ticket/4677 https://svn.boost.org/trac10/ticket/4677 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">v3_remove_all.cpp</span> </li> </ul> <p> Sample source code </p> Ticket Richard Hazlewood <boost@…> Thu, 23 Sep 2010 21:44:57 GMT <link>https://svn.boost.org/trac10/ticket/4677#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/4677#comment:1</guid> <description> <p> This looks like the issue described in <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/4640" title="#4640: Bugs: Fixed-sized array constructor can have unintended consequences (closed: fixed)">#4640</a> </p> </description> <category>Ticket</category> </item> <item> <author>terminatorul@…</author> <pubDate>Fri, 24 Sep 2010 15:16:27 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/4677#comment:2 https://svn.boost.org/trac10/ticket/4677#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">duplicate</span> </li> </ul> <p> Indeed, it is the same bug. </p> Ticket