Opened 12 years ago
Closed 12 years ago
#4677 closed Bugs (duplicate)
[filesystem] V3 filesystem::path corrupted if constructed from a local buffer
Reported by: | Owned by: | Beman Dawes | |
---|---|---|---|
Milestone: | To Be Determined | Component: | filesystem |
Version: | Boost 1.44.0 | Severity: | Regression |
Keywords: | V3 filesystem::path corrupted | Cc: |
Description
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.
Attachments (1)
Change History (3)
by , 12 years ago
Attachment: | v3_remove_all.cpp added |
---|
comment:2 by , 12 years ago
Resolution: | → duplicate |
---|---|
Status: | new → closed |
Indeed, it is the same bug.
Sample source code