id summary reporter owner description type status milestone component version severity resolution keywords cc 8007 Possible memory leak in filesystem::copy() anonymous Beman Dawes "I executed my program in valgrind to try to find out some memory leaks and I discovered one in boost::filesystem::copy(). My code is something like this: {{{ namespace fs = boost::filesystem; std::string from(""file1""), to(""file2""); // where from and to are regular files try { fs::copy(from,to); // leak here } catch(fs::filesystem_error) { // treat exception } }}} The backtrace I could get with valgrind is: {{{ ==4966== 32,768 bytes in 1 blocks are definitely lost in loss record 1,463 of 1,516 ==4966== at 0x4C2BBF7: operator new[](unsigned long) (vg_replace_malloc.c:363) ==4966== by 0x10A09C1: boost::filesystem::detail::copy(boost::filesystem::path const&, boost::filesystem::path const&, boost::system::error_code*) (in /old ==4966== by 0x109A501: boost::filesystem::copy(boost::filesystem::path const&, boost::filesystem::path const&) (operations.hpp:367) ==4966== by 0x109A26B: System::copyFile(std::string const&, std::string const&) (system.cpp:78) }}} Where System::copyFile(string,string) is a class from my system, which basically calls the above code. I'm using Ubuntu 12.04 amd64 with boost 1.52 compiled by myself. I'm also using jemalloc as memory allocator." Bugs closed To Be Determined filesystem Boost 1.52.0 Problem worksforme