[Boost-bugs] [Boost C++ Libraries] #4677: [filesystem] V3 filesystem::path corrupted if constructed from a local buffer

Subject: [Boost-bugs] [Boost C++ Libraries] #4677: [filesystem] V3 filesystem::path corrupted if constructed from a local buffer
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2010-09-22 20:39:28


#4677: [filesystem] V3 filesystem::path corrupted if constructed from a local
buffer
-------------------------------------------+--------------------------------
 Reporter: terminatorul@… | Owner: bemandawes
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: filesystem
  Version: Boost 1.44.0 | Severity: Regression
 Keywords: V3 filesystem::path corrupted |
-------------------------------------------+--------------------------------
 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.

 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'

 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.

 To run the sample code just create an empty VC++ project and add the .cpp
 to it.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/4677>
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:04 UTC