[Boost-bugs] [Boost C++ Libraries] #9830: memory leak in time_duration

Subject: [Boost-bugs] [Boost C++ Libraries] #9830: memory leak in time_duration
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2014-04-02 18:27:53


#9830: memory leak in time_duration
------------------------------+------------------------
 Reporter: mm@… | Owner: az_sw_dude
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: date_time
  Version: Boost 1.54.0 | Severity: Problem
 Keywords: |
------------------------------+------------------------
 Hi folks,
 this is a leak i've found compiling this very single line:
 boost::posix_time::time_duration td(1,0,0,0); cout << td;

 valgrind reports the following leak:
 ==16902== 25 bytes in 1 blocks are possibly lost in loss record 21 of 29
 ==16902== at 0x40290AC: operator new(unsigned int)
 (vg_replace_malloc.c:313)
 ==16902== by 0x455BB54: std::string::_Rep::_S_create(unsigned int,
 unsigned int, std::allocator<char> const&) (in /usr/lib/i386-linux-
 gnu/libstdc++.so.6.0.19)
 ==16902== by 0x455CC72:
 std::string::_Rep::_M_clone(std::allocator<char> const&, unsigned int) (in
 /usr/lib/i386-linux-gnu/libstdc++.so.6.0.19)
 ==16902== by 0x455CD10: std::string::reserve(unsigned int) (in
 /usr/lib/i386-linux-gnu/libstdc++.so.6.0.19)
 ==16902== by 0x455CF8C: std::string::append(char const*, unsigned int)
 (in /usr/lib/i386-linux-gnu/libstdc++.so.6.0.19)
 ==16902== by 0x8079DE9:
 boost::date_time::time_facet<boost::posix_time::ptime, char,
 std::ostreambuf_iterator<char, std::char_traits<char> >
>::time_facet(unsigned int) (in /home/marcos/release/sandbox/chutaygol)
 ==16902== by 0x8084086: std::basic_ostream<char, std::char_traits<char>
>& boost::posix_time::operator<< <char, std::char_traits<char>
>(std::basic_ostream<char, std::char_traits<char> >&,
 boost::posix_time::time_duration const&)

 I hope you find a bug with the help of my report
 Marcos Mayorga

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