Re: [Boost-bugs] [Boost C++ Libraries] #4846: streaming gregorian::date objects to std::cout leaks memory

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #4846: streaming gregorian::date objects to std::cout leaks memory
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2010-11-27 18:05:26


#4846: streaming gregorian::date objects to std::cout leaks memory
----------------------------------+-----------------------------------------
  Reporter: robbie@… | Owner: az_sw_dude
      Type: Bugs | Status: new
 Milestone: To Be Determined | Component: date_time
   Version: Boost 1.44.0 | Severity: Problem
Resolution: | Keywords:
----------------------------------+-----------------------------------------

Comment (by robbie@…):

 Requested information follows. But now with Boost version 1.45.0.
 Everything else remains the same:

 {{{
 // build : $ g++ -ggdb -Wall -pedantic -Weffc++ test.cc -o test
 // run : $ valgrind --leak-check=full ./test
 // compiler : g++ (Ubuntu 4.4.3-4ubuntu5) 4.4.3
 // library : Boost 1.45.0
 }}}

 Valgrind output:

 {{{
 ==5370== Memcheck, a memory error detector
 ==5370== Copyright (C) 2002-2009, and GNU GPL'd, by Julian Seward et al.
 ==5370== Using Valgrind-3.6.0.SVN-Debian and LibVEX; rerun with -h for
 copyright info
 ==5370== Command: ./test
 ==5370==
 today (1) : 2010-Nov-12
 today (2) : 2010-Nov-12
 ==5370==
 ==5370== HEAP SUMMARY:
 ==5370== in use at exit: 1,544 bytes in 26 blocks
 ==5370== total heap usage: 64 allocs, 38 frees, 4,609 bytes allocated
 ==5370==
 ==5370== 26 bytes in 1 blocks are possibly lost in loss record 1 of 24
 ==5370== at 0x4C27CC1: operator new(unsigned long)
 (vg_replace_malloc.c:261)
 ==5370== by 0x4EF14E0:
 __gnu_cxx::new_allocator<char>::allocate(unsigned long, void const*)
 (new_allocator.h:89)
 ==5370== by 0x4EF07AE: std::string::_Rep::_S_create(unsigned long,
 unsigned long, std::allocator<char> const&) (basic_string.tcc:585)
 ==5370== by 0x4EF11E8: char* std::string::_S_construct<char
 const*>(char const*, char const*, std::allocator<char> const&,
 std::forward_iterator_tag) (basic_string.tcc:139)
 ==5370== by 0x4EF16BD: char* std::string::_S_construct_aux<char
 const*>(char const*, char const*, std::allocator<char> const&,
 std::__false_type) (basic_string.h:1546)
 ==5370== by 0x4EF12D4: char* std::string::_S_construct<char
 const*>(char const*, char const*, std::allocator<char> const&)
 (basic_string.h:1562)
 ==5370== by 0x4EECFCD: std::basic_string<char, std::char_traits<char>,
 std::allocator<char> >::basic_string(char const*, std::allocator<char>
 const&) (basic_string.tcc:216)
 ==5370== by 0x406F99: boost::date_time::period_formatter<char,
 std::ostreambuf_iterator<char, std::char_traits<char> >
>::period_formatter(boost::date_time::period_formatter<char,
 std::ostreambuf_iterator<char, std::char_traits<char> >
>::range_display_options, char const*, char const*, char const*, char
 const*) (period_formatter.hpp:61)
 ==5370== by 0x406037:
 boost::date_time::date_facet<boost::gregorian::date, char,
 std::ostreambuf_iterator<char, std::char_traits<char> >
>::date_facet(unsigned long) (date_facet.hpp:90)
 ==5370== by 0x40467C: std::basic_ostream<char, std::char_traits<char>
>& boost::gregorian::operator<< <char, std::char_traits<char>
>(std::basic_ostream<char, std::char_traits<char> >&,
 boost::gregorian::date const&) (gregorian_io.hpp:62)
 ==5370== by 0x402A69: main (frag-boost-date-time-memoryleak-1.cc:37)
 ==5370==
 ==5370== 26 bytes in 1 blocks are possibly lost in loss record 2 of 24
 ==5370== at 0x4C27CC1: operator new(unsigned long)
 (vg_replace_malloc.c:261)
 ==5370== by 0x4EF14E0:
 __gnu_cxx::new_allocator<char>::allocate(unsigned long, void const*)
 (new_allocator.h:89)
 ==5370== by 0x4EF07AE: std::string::_Rep::_S_create(unsigned long,
 unsigned long, std::allocator<char> const&) (basic_string.tcc:585)
 ==5370== by 0x4EF11E8: char* std::string::_S_construct<char
 const*>(char const*, char const*, std::allocator<char> const&,
 std::forward_iterator_tag) (basic_string.tcc:139)
 ==5370== by 0x4EF16BD: char* std::string::_S_construct_aux<char
 const*>(char const*, char const*, std::allocator<char> const&,
 std::__false_type) (basic_string.h:1546)
 ==5370== by 0x4EF12D4: char* std::string::_S_construct<char
 const*>(char const*, char const*, std::allocator<char> const&)
 (basic_string.h:1562)
 ==5370== by 0x4EECFCD: std::basic_string<char, std::char_traits<char>,
 std::allocator<char> >::basic_string(char const*, std::allocator<char>
 const&) (basic_string.tcc:216)
 ==5370== by 0x406FCC: boost::date_time::period_formatter<char,
 std::ostreambuf_iterator<char, std::char_traits<char> >
>::period_formatter(boost::date_time::period_formatter<char,
 std::ostreambuf_iterator<char, std::char_traits<char> >
>::range_display_options, char const*, char const*, char const*, char
 const*) (period_formatter.hpp:61)
 ==5370== by 0x406037:
 boost::date_time::date_facet<boost::gregorian::date, char,
 std::ostreambuf_iterator<char, std::char_traits<char> >
>::date_facet(unsigned long) (date_facet.hpp:90)
 ==5370== by 0x40467C: std::basic_ostream<char, std::char_traits<char>
>& boost::gregorian::operator<< <char, std::char_traits<char>
>(std::basic_ostream<char, std::char_traits<char> >&,
 boost::gregorian::date const&) (gregorian_io.hpp:62)
 ==5370== by 0x402A69: main (frag-boost-date-time-memoryleak-1.cc:37)
 ==5370==
 ==5370== 26 bytes in 1 blocks are possibly lost in loss record 3 of 24
 ==5370== at 0x4C27CC1: operator new(unsigned long)
 (vg_replace_malloc.c:261)
 ==5370== by 0x4EF14E0:
 __gnu_cxx::new_allocator<char>::allocate(unsigned long, void const*)
 (new_allocator.h:89)
 ==5370== by 0x4EF07AE: std::string::_Rep::_S_create(unsigned long,
 unsigned long, std::allocator<char> const&) (basic_string.tcc:585)
 ==5370== by 0x4EF11E8: char* std::string::_S_construct<char
 const*>(char const*, char const*, std::allocator<char> const&,
 std::forward_iterator_tag) (basic_string.tcc:139)
 ==5370== by 0x4EF16BD: char* std::string::_S_construct_aux<char
 const*>(char const*, char const*, std::allocator<char> const&,
 std::__false_type) (basic_string.h:1546)
 ==5370== by 0x4EF12D4: char* std::string::_S_construct<char
 const*>(char const*, char const*, std::allocator<char> const&)
 (basic_string.h:1562)
 ==5370== by 0x4EECFCD: std::basic_string<char, std::char_traits<char>,
 std::allocator<char> >::basic_string(char const*, std::allocator<char>
 const&) (basic_string.tcc:216)
 ==5370== by 0x407020: boost::date_time::period_formatter<char,
 std::ostreambuf_iterator<char, std::char_traits<char> >
>::period_formatter(boost::date_time::period_formatter<char,
 std::ostreambuf_iterator<char, std::char_traits<char> >
>::range_display_options, char const*, char const*, char const*, char
 const*) (period_formatter.hpp:61)
 ==5370== by 0x406037:
 boost::date_time::date_facet<boost::gregorian::date, char,
 std::ostreambuf_iterator<char, std::char_traits<char> >
>::date_facet(unsigned long) (date_facet.hpp:90)
 ==5370== by 0x40467C: std::basic_ostream<char, std::char_traits<char>
>& boost::gregorian::operator<< <char, std::char_traits<char>
>(std::basic_ostream<char, std::char_traits<char> >&,
 boost::gregorian::date const&) (gregorian_io.hpp:62)
 ==5370== by 0x402A69: main (frag-boost-date-time-memoryleak-1.cc:37)
 ==5370==
 ==5370== 26 bytes in 1 blocks are possibly lost in loss record 4 of 24
 ==5370== at 0x4C27CC1: operator new(unsigned long)
 (vg_replace_malloc.c:261)
 ==5370== by 0x4EF14E0:
 __gnu_cxx::new_allocator<char>::allocate(unsigned long, void const*)
 (new_allocator.h:89)
 ==5370== by 0x4EF07AE: std::string::_Rep::_S_create(unsigned long,
 unsigned long, std::allocator<char> const&) (basic_string.tcc:585)
 ==5370== by 0x4EF11E8: char* std::string::_S_construct<char
 const*>(char const*, char const*, std::allocator<char> const&,
 std::forward_iterator_tag) (basic_string.tcc:139)
 ==5370== by 0x4EF16BD: char* std::string::_S_construct_aux<char
 const*>(char const*, char const*, std::allocator<char> const&,
 std::__false_type) (basic_string.h:1546)
 ==5370== by 0x4EF12D4: char* std::string::_S_construct<char
 const*>(char const*, char const*, std::allocator<char> const&)
 (basic_string.h:1562)
 ==5370== by 0x4EECFCD: std::basic_string<char, std::char_traits<char>,
 std::allocator<char> >::basic_string(char const*, std::allocator<char>
 const&) (basic_string.tcc:216)
 ==5370== by 0x407071: boost::date_time::period_formatter<char,
 std::ostreambuf_iterator<char, std::char_traits<char> >
>::period_formatter(boost::date_time::period_formatter<char,
 std::ostreambuf_iterator<char, std::char_traits<char> >
>::range_display_options, char const*, char const*, char const*, char
 const*) (period_formatter.hpp:61)
 ==5370== by 0x406037:
 boost::date_time::date_facet<boost::gregorian::date, char,
 std::ostreambuf_iterator<char, std::char_traits<char> >
>::date_facet(unsigned long) (date_facet.hpp:90)
 ==5370== by 0x40467C: std::basic_ostream<char, std::char_traits<char>
>& boost::gregorian::operator<< <char, std::char_traits<char>
>(std::basic_ostream<char, std::char_traits<char> >&,
 boost::gregorian::date const&) (gregorian_io.hpp:62)
 ==5370== by 0x402A69: main (frag-boost-date-time-memoryleak-1.cc:37)
 ==5370==
 ==5370== 27 bytes in 1 blocks are possibly lost in loss record 5 of 24
 ==5370== at 0x4C27CC1: operator new(unsigned long)
 (vg_replace_malloc.c:261)
 ==5370== by 0x4EF14E0:
 __gnu_cxx::new_allocator<char>::allocate(unsigned long, void const*)
 (new_allocator.h:89)
 ==5370== by 0x4EF07AE: std::string::_Rep::_S_create(unsigned long,
 unsigned long, std::allocator<char> const&) (basic_string.tcc:585)
 ==5370== by 0x4EF11E8: char* std::string::_S_construct<char
 const*>(char const*, char const*, std::allocator<char> const&,
 std::forward_iterator_tag) (basic_string.tcc:139)
 ==5370== by 0x4EF16BD: char* std::string::_S_construct_aux<char
 const*>(char const*, char const*, std::allocator<char> const&,
 std::__false_type) (basic_string.h:1546)
 ==5370== by 0x4EF12D4: char* std::string::_S_construct<char
 const*>(char const*, char const*, std::allocator<char> const&)
 (basic_string.h:1562)
 ==5370== by 0x4EECFCD: std::basic_string<char, std::char_traits<char>,
 std::allocator<char> >::basic_string(char const*, std::allocator<char>
 const&) (basic_string.tcc:216)
 ==5370== by 0x405F90:
 boost::date_time::date_facet<boost::gregorian::date, char,
 std::ostreambuf_iterator<char, std::char_traits<char> >
>::date_facet(unsigned long) (date_facet.hpp:90)
 ==5370== by 0x40467C: std::basic_ostream<char, std::char_traits<char>
>& boost::gregorian::operator<< <char, std::char_traits<char>
>(std::basic_ostream<char, std::char_traits<char> >&,
 boost::gregorian::date const&) (gregorian_io.hpp:62)
 ==5370== by 0x402A69: main (frag-boost-date-time-memoryleak-1.cc:37)
 ==5370==
 ==5370== 27 bytes in 1 blocks are possibly lost in loss record 6 of 24
 ==5370== at 0x4C27CC1: operator new(unsigned long)
 (vg_replace_malloc.c:261)
 ==5370== by 0x4EF14E0:
 __gnu_cxx::new_allocator<char>::allocate(unsigned long, void const*)
 (new_allocator.h:89)
 ==5370== by 0x4EF07AE: std::string::_Rep::_S_create(unsigned long,
 unsigned long, std::allocator<char> const&) (basic_string.tcc:585)
 ==5370== by 0x4EF11E8: char* std::string::_S_construct<char
 const*>(char const*, char const*, std::allocator<char> const&,
 std::forward_iterator_tag) (basic_string.tcc:139)
 ==5370== by 0x4EF16BD: char* std::string::_S_construct_aux<char
 const*>(char const*, char const*, std::allocator<char> const&,
 std::__false_type) (basic_string.h:1546)
 ==5370== by 0x4EF12D4: char* std::string::_S_construct<char
 const*>(char const*, char const*, std::allocator<char> const&)
 (basic_string.h:1562)
 ==5370== by 0x4EECFCD: std::basic_string<char, std::char_traits<char>,
 std::allocator<char> >::basic_string(char const*, std::allocator<char>
 const&) (basic_string.tcc:216)
 ==5370== by 0x405FE2:
 boost::date_time::date_facet<boost::gregorian::date, char,
 std::ostreambuf_iterator<char, std::char_traits<char> >
>::date_facet(unsigned long) (date_facet.hpp:90)
 ==5370== by 0x40467C: std::basic_ostream<char, std::char_traits<char>
>& boost::gregorian::operator<< <char, std::char_traits<char>
>(std::basic_ostream<char, std::char_traits<char> >&,
 boost::gregorian::date const&) (gregorian_io.hpp:62)
 ==5370== by 0x402A69: main (frag-boost-date-time-memoryleak-1.cc:37)
 ==5370==
 ==5370== 27 bytes in 1 blocks are possibly lost in loss record 7 of 24
 ==5370== at 0x4C27CC1: operator new(unsigned long)
 (vg_replace_malloc.c:261)
 ==5370== by 0x4EF14E0:
 __gnu_cxx::new_allocator<char>::allocate(unsigned long, void const*)
 (new_allocator.h:89)
 ==5370== by 0x4EF07AE: std::string::_Rep::_S_create(unsigned long,
 unsigned long, std::allocator<char> const&) (basic_string.tcc:585)
 ==5370== by 0x4EF11E8: char* std::string::_S_construct<char
 const*>(char const*, char const*, std::allocator<char> const&,
 std::forward_iterator_tag) (basic_string.tcc:139)
 ==5370== by 0x4EF16BD: char* std::string::_S_construct_aux<char
 const*>(char const*, char const*, std::allocator<char> const&,
 std::__false_type) (basic_string.h:1546)
 ==5370== by 0x4EF12D4: char* std::string::_S_construct<char
 const*>(char const*, char const*, std::allocator<char> const&)
 (basic_string.h:1562)
 ==5370== by 0x4EECFCD: std::basic_string<char, std::char_traits<char>,
 std::allocator<char> >::basic_string(char const*, std::allocator<char>
 const&) (basic_string.tcc:216)
 ==5370== by 0x4075A7:
 boost::date_time::date_generator_formatter<boost::gregorian::date, char,
 std::ostreambuf_iterator<char, std::char_traits<char> >
>::date_generator_formatter() (date_generator_formatter.hpp:75)
 ==5370== by 0x406065:
 boost::date_time::date_facet<boost::gregorian::date, char,
 std::ostreambuf_iterator<char, std::char_traits<char> >
>::date_facet(unsigned long) (date_facet.hpp:90)
 ==5370== by 0x40467C: std::basic_ostream<char, std::char_traits<char>
>& boost::gregorian::operator<< <char, std::char_traits<char>
>(std::basic_ostream<char, std::char_traits<char> >&,
 boost::gregorian::date const&) (gregorian_io.hpp:62)
 ==5370== by 0x402A69: main (frag-boost-date-time-memoryleak-1.cc:37)
 ==5370==
 ==5370== 29 bytes in 1 blocks are possibly lost in loss record 8 of 24
 ==5370== at 0x4C27CC1: operator new(unsigned long)
 (vg_replace_malloc.c:261)
 ==5370== by 0x4EF14E0:
 __gnu_cxx::new_allocator<char>::allocate(unsigned long, void const*)
 (new_allocator.h:89)
 ==5370== by 0x4EF07AE: std::string::_Rep::_S_create(unsigned long,
 unsigned long, std::allocator<char> const&) (basic_string.tcc:585)
 ==5370== by 0x4EF11E8: char* std::string::_S_construct<char
 const*>(char const*, char const*, std::allocator<char> const&,
 std::forward_iterator_tag) (basic_string.tcc:139)
 ==5370== by 0x4EF16BD: char* std::string::_S_construct_aux<char
 const*>(char const*, char const*, std::allocator<char> const&,
 std::__false_type) (basic_string.h:1546)
 ==5370== by 0x4EF12D4: char* std::string::_S_construct<char
 const*>(char const*, char const*, std::allocator<char> const&)
 (basic_string.h:1562)
 ==5370== by 0x4EECFCD: std::basic_string<char, std::char_traits<char>,
 std::allocator<char> >::basic_string(char const*, std::allocator<char>
 const&) (basic_string.tcc:216)
 ==5370== by 0x4073F4:
 boost::date_time::date_generator_formatter<boost::gregorian::date, char,
 std::ostreambuf_iterator<char, std::char_traits<char> >
>::date_generator_formatter() (date_generator_formatter.hpp:72)
 ==5370== by 0x406065:
 boost::date_time::date_facet<boost::gregorian::date, char,
 std::ostreambuf_iterator<char, std::char_traits<char> >
>::date_facet(unsigned long) (date_facet.hpp:90)
 ==5370== by 0x40467C: std::basic_ostream<char, std::char_traits<char>
>& boost::gregorian::operator<< <char, std::char_traits<char>
>(std::basic_ostream<char, std::char_traits<char> >&,
 boost::gregorian::date const&) (gregorian_io.hpp:62)
 ==5370== by 0x402A69: main (frag-boost-date-time-memoryleak-1.cc:37)
 ==5370==
 ==5370== 30 bytes in 1 blocks are possibly lost in loss record 9 of 24
 ==5370== at 0x4C27CC1: operator new(unsigned long)
 (vg_replace_malloc.c:261)
 ==5370== by 0x4EF14E0:
 __gnu_cxx::new_allocator<char>::allocate(unsigned long, void const*)
 (new_allocator.h:89)
 ==5370== by 0x4EF07AE: std::string::_Rep::_S_create(unsigned long,
 unsigned long, std::allocator<char> const&) (basic_string.tcc:585)
 ==5370== by 0x4EF11E8: char* std::string::_S_construct<char
 const*>(char const*, char const*, std::allocator<char> const&,
 std::forward_iterator_tag) (basic_string.tcc:139)
 ==5370== by 0x4EF16BD: char* std::string::_S_construct_aux<char
 const*>(char const*, char const*, std::allocator<char> const&,
 std::__false_type) (basic_string.h:1546)
 ==5370== by 0x4EF12D4: char* std::string::_S_construct<char
 const*>(char const*, char const*, std::allocator<char> const&)
 (basic_string.h:1562)
 ==5370== by 0x4EECFCD: std::basic_string<char, std::char_traits<char>,
 std::allocator<char> >::basic_string(char const*, std::allocator<char>
 const&) (basic_string.tcc:216)
 ==5370== by 0x40716A:
 boost::date_time::date_generator_formatter<boost::gregorian::date, char,
 std::ostreambuf_iterator<char, std::char_traits<char> >
>::date_generator_formatter() (date_generator_formatter.hpp:67)
 ==5370== by 0x406065:
 boost::date_time::date_facet<boost::gregorian::date, char,
 std::ostreambuf_iterator<char, std::char_traits<char> >
>::date_facet(unsigned long) (date_facet.hpp:90)
 ==5370== by 0x40467C: std::basic_ostream<char, std::char_traits<char>
>& boost::gregorian::operator<< <char, std::char_traits<char>
>(std::basic_ostream<char, std::char_traits<char> >&,
 boost::gregorian::date const&) (gregorian_io.hpp:62)
 ==5370== by 0x402A69: main (frag-boost-date-time-memoryleak-1.cc:37)
 ==5370==
 ==5370== 30 bytes in 1 blocks are possibly lost in loss record 10 of 24
 ==5370== at 0x4C27CC1: operator new(unsigned long)
 (vg_replace_malloc.c:261)
 ==5370== by 0x4EF14E0:
 __gnu_cxx::new_allocator<char>::allocate(unsigned long, void const*)
 (new_allocator.h:89)
 ==5370== by 0x4EF07AE: std::string::_Rep::_S_create(unsigned long,
 unsigned long, std::allocator<char> const&) (basic_string.tcc:585)
 ==5370== by 0x4EF11E8: char* std::string::_S_construct<char
 const*>(char const*, char const*, std::allocator<char> const&,
 std::forward_iterator_tag) (basic_string.tcc:139)
 ==5370== by 0x4EF16BD: char* std::string::_S_construct_aux<char
 const*>(char const*, char const*, std::allocator<char> const&,
 std::__false_type) (basic_string.h:1546)
 ==5370== by 0x4EF12D4: char* std::string::_S_construct<char
 const*>(char const*, char const*, std::allocator<char> const&)
 (basic_string.h:1562)
 ==5370== by 0x4EECFCD: std::basic_string<char, std::char_traits<char>,
 std::allocator<char> >::basic_string(char const*, std::allocator<char>
 const&) (basic_string.tcc:216)
 ==5370== by 0x40725C:
 boost::date_time::date_generator_formatter<boost::gregorian::date, char,
 std::ostreambuf_iterator<char, std::char_traits<char> >
>::date_generator_formatter() (date_generator_formatter.hpp:69)
 ==5370== by 0x406065:
 boost::date_time::date_facet<boost::gregorian::date, char,
 std::ostreambuf_iterator<char, std::char_traits<char> >
>::date_facet(unsigned long) (date_facet.hpp:90)
 ==5370== by 0x40467C: std::basic_ostream<char, std::char_traits<char>
>& boost::gregorian::operator<< <char, std::char_traits<char>
>(std::basic_ostream<char, std::char_traits<char> >&,
 boost::gregorian::date const&) (gregorian_io.hpp:62)
 ==5370== by 0x402A69: main (frag-boost-date-time-memoryleak-1.cc:37)
 ==5370==
 ==5370== 30 bytes in 1 blocks are possibly lost in loss record 11 of 24
 ==5370== at 0x4C27CC1: operator new(unsigned long)
 (vg_replace_malloc.c:261)
 ==5370== by 0x4EF14E0:
 __gnu_cxx::new_allocator<char>::allocate(unsigned long, void const*)
 (new_allocator.h:89)
 ==5370== by 0x4EF07AE: std::string::_Rep::_S_create(unsigned long,
 unsigned long, std::allocator<char> const&) (basic_string.tcc:585)
 ==5370== by 0x4EF11E8: char* std::string::_S_construct<char
 const*>(char const*, char const*, std::allocator<char> const&,
 std::forward_iterator_tag) (basic_string.tcc:139)
 ==5370== by 0x4EF16BD: char* std::string::_S_construct_aux<char
 const*>(char const*, char const*, std::allocator<char> const&,
 std::__false_type) (basic_string.h:1546)
 ==5370== by 0x4EF12D4: char* std::string::_S_construct<char
 const*>(char const*, char const*, std::allocator<char> const&)
 (basic_string.h:1562)
 ==5370== by 0x4EECFCD: std::basic_string<char, std::char_traits<char>,
 std::allocator<char> >::basic_string(char const*, std::allocator<char>
 const&) (basic_string.tcc:216)
 ==5370== by 0x40736C:
 boost::date_time::date_generator_formatter<boost::gregorian::date, char,
 std::ostreambuf_iterator<char, std::char_traits<char> >
>::date_generator_formatter() (date_generator_formatter.hpp:71)
 ==5370== by 0x406065:
 boost::date_time::date_facet<boost::gregorian::date, char,
 std::ostreambuf_iterator<char, std::char_traits<char> >
>::date_facet(unsigned long) (date_facet.hpp:90)
 ==5370== by 0x40467C: std::basic_ostream<char, std::char_traits<char>
>& boost::gregorian::operator<< <char, std::char_traits<char>
>(std::basic_ostream<char, std::char_traits<char> >&,
 boost::gregorian::date const&) (gregorian_io.hpp:62)
 ==5370== by 0x402A69: main (frag-boost-date-time-memoryleak-1.cc:37)
 ==5370==
 ==5370== 30 bytes in 1 blocks are possibly lost in loss record 12 of 24
 ==5370== at 0x4C27CC1: operator new(unsigned long)
 (vg_replace_malloc.c:261)
 ==5370== by 0x4EF14E0:
 __gnu_cxx::new_allocator<char>::allocate(unsigned long, void const*)
 (new_allocator.h:89)
 ==5370== by 0x4EF07AE: std::string::_Rep::_S_create(unsigned long,
 unsigned long, std::allocator<char> const&) (basic_string.tcc:585)
 ==5370== by 0x4EF11E8: char* std::string::_S_construct<char
 const*>(char const*, char const*, std::allocator<char> const&,
 std::forward_iterator_tag) (basic_string.tcc:139)
 ==5370== by 0x4EF16BD: char* std::string::_S_construct_aux<char
 const*>(char const*, char const*, std::allocator<char> const&,
 std::__false_type) (basic_string.h:1546)
 ==5370== by 0x4EF12D4: char* std::string::_S_construct<char
 const*>(char const*, char const*, std::allocator<char> const&)
 (basic_string.h:1562)
 ==5370== by 0x4EECFCD: std::basic_string<char, std::char_traits<char>,
 std::allocator<char> >::basic_string(char const*, std::allocator<char>
 const&) (basic_string.tcc:216)
 ==5370== by 0x407513:
 boost::date_time::date_generator_formatter<boost::gregorian::date, char,
 std::ostreambuf_iterator<char, std::char_traits<char> >
>::date_generator_formatter() (date_generator_formatter.hpp:74)
 ==5370== by 0x406065:
 boost::date_time::date_facet<boost::gregorian::date, char,
 std::ostreambuf_iterator<char, std::char_traits<char> >
>::date_facet(unsigned long) (date_facet.hpp:90)
 ==5370== by 0x40467C: std::basic_ostream<char, std::char_traits<char>
>& boost::gregorian::operator<< <char, std::char_traits<char>
>(std::basic_ostream<char, std::char_traits<char> >&,
 boost::gregorian::date const&) (gregorian_io.hpp:62)
 ==5370== by 0x402A69: main (frag-boost-date-time-memoryleak-1.cc:37)
 ==5370==
 ==5370== 31 bytes in 1 blocks are possibly lost in loss record 13 of 24
 ==5370== at 0x4C27CC1: operator new(unsigned long)
 (vg_replace_malloc.c:261)
 ==5370== by 0x4EF14E0:
 __gnu_cxx::new_allocator<char>::allocate(unsigned long, void const*)
 (new_allocator.h:89)
 ==5370== by 0x4EF07AE: std::string::_Rep::_S_create(unsigned long,
 unsigned long, std::allocator<char> const&) (basic_string.tcc:585)
 ==5370== by 0x4EF11E8: char* std::string::_S_construct<char
 const*>(char const*, char const*, std::allocator<char> const&,
 std::forward_iterator_tag) (basic_string.tcc:139)
 ==5370== by 0x4EF16BD: char* std::string::_S_construct_aux<char
 const*>(char const*, char const*, std::allocator<char> const&,
 std::__false_type) (basic_string.h:1546)
 ==5370== by 0x4EF12D4: char* std::string::_S_construct<char
 const*>(char const*, char const*, std::allocator<char> const&)
 (basic_string.h:1562)
 ==5370== by 0x4EECFCD: std::basic_string<char, std::char_traits<char>,
 std::allocator<char> >::basic_string(char const*, std::allocator<char>
 const&) (basic_string.tcc:216)
 ==5370== by 0x4071D4:
 boost::date_time::date_generator_formatter<boost::gregorian::date, char,
 std::ostreambuf_iterator<char, std::char_traits<char> >
>::date_generator_formatter() (date_generator_formatter.hpp:68)
 ==5370== by 0x406065:
 boost::date_time::date_facet<boost::gregorian::date, char,
 std::ostreambuf_iterator<char, std::char_traits<char> >
>::date_facet(unsigned long) (date_facet.hpp:90)
 ==5370== by 0x40467C: std::basic_ostream<char, std::char_traits<char>
>& boost::gregorian::operator<< <char, std::char_traits<char>
>(std::basic_ostream<char, std::char_traits<char> >&,
 boost::gregorian::date const&) (gregorian_io.hpp:62)
 ==5370== by 0x402A69: main (frag-boost-date-time-memoryleak-1.cc:37)
 ==5370==
 ==5370== 31 bytes in 1 blocks are possibly lost in loss record 14 of 24
 ==5370== at 0x4C27CC1: operator new(unsigned long)
 (vg_replace_malloc.c:261)
 ==5370== by 0x4EF14E0:
 __gnu_cxx::new_allocator<char>::allocate(unsigned long, void const*)
 (new_allocator.h:89)
 ==5370== by 0x4EF07AE: std::string::_Rep::_S_create(unsigned long,
 unsigned long, std::allocator<char> const&) (basic_string.tcc:585)
 ==5370== by 0x4EF11E8: char* std::string::_S_construct<char
 const*>(char const*, char const*, std::allocator<char> const&,
 std::forward_iterator_tag) (basic_string.tcc:139)
 ==5370== by 0x4EF16BD: char* std::string::_S_construct_aux<char
 const*>(char const*, char const*, std::allocator<char> const&,
 std::__false_type) (basic_string.h:1546)
 ==5370== by 0x4EF12D4: char* std::string::_S_construct<char
 const*>(char const*, char const*, std::allocator<char> const&)
 (basic_string.h:1562)
 ==5370== by 0x4EECFCD: std::basic_string<char, std::char_traits<char>,
 std::allocator<char> >::basic_string(char const*, std::allocator<char>
 const&) (basic_string.tcc:216)
 ==5370== by 0x4072E4:
 boost::date_time::date_generator_formatter<boost::gregorian::date, char,
 std::ostreambuf_iterator<char, std::char_traits<char> >
>::date_generator_formatter() (date_generator_formatter.hpp:70)
 ==5370== by 0x406065:
 boost::date_time::date_facet<boost::gregorian::date, char,
 std::ostreambuf_iterator<char, std::char_traits<char> >
>::date_facet(unsigned long) (date_facet.hpp:90)
 ==5370== by 0x40467C: std::basic_ostream<char, std::char_traits<char>
>& boost::gregorian::operator<< <char, std::char_traits<char>
>(std::basic_ostream<char, std::char_traits<char> >&,
 boost::gregorian::date const&) (gregorian_io.hpp:62)
 ==5370== by 0x402A69: main (frag-boost-date-time-memoryleak-1.cc:37)
 ==5370==
 ==5370== 31 bytes in 1 blocks are possibly lost in loss record 15 of 24
 ==5370== at 0x4C27CC1: operator new(unsigned long)
 (vg_replace_malloc.c:261)
 ==5370== by 0x4EF14E0:
 __gnu_cxx::new_allocator<char>::allocate(unsigned long, void const*)
 (new_allocator.h:89)
 ==5370== by 0x4EF07AE: std::string::_Rep::_S_create(unsigned long,
 unsigned long, std::allocator<char> const&) (basic_string.tcc:585)
 ==5370== by 0x4EF11E8: char* std::string::_S_construct<char
 const*>(char const*, char const*, std::allocator<char> const&,
 std::forward_iterator_tag) (basic_string.tcc:139)
 ==5370== by 0x4EF16BD: char* std::string::_S_construct_aux<char
 const*>(char const*, char const*, std::allocator<char> const&,
 std::__false_type) (basic_string.h:1546)
 ==5370== by 0x4EF12D4: char* std::string::_S_construct<char
 const*>(char const*, char const*, std::allocator<char> const&)
 (basic_string.h:1562)
 ==5370== by 0x4EECFCD: std::basic_string<char, std::char_traits<char>,
 std::allocator<char> >::basic_string(char const*, std::allocator<char>
 const&) (basic_string.tcc:216)
 ==5370== by 0x40747F:
 boost::date_time::date_generator_formatter<boost::gregorian::date, char,
 std::ostreambuf_iterator<char, std::char_traits<char> >
>::date_generator_formatter() (date_generator_formatter.hpp:73)
 ==5370== by 0x406065:
 boost::date_time::date_facet<boost::gregorian::date, char,
 std::ostreambuf_iterator<char, std::char_traits<char> >
>::date_facet(unsigned long) (date_facet.hpp:90)
 ==5370== by 0x40467C: std::basic_ostream<char, std::char_traits<char>
>& boost::gregorian::operator<< <char, std::char_traits<char>
>(std::basic_ostream<char, std::char_traits<char> >&,
 boost::gregorian::date const&) (gregorian_io.hpp:62)
 ==5370== by 0x402A69: main (frag-boost-date-time-memoryleak-1.cc:37)
 ==5370==
 ==5370== 33 bytes in 1 blocks are possibly lost in loss record 17 of 24
 ==5370== at 0x4C27CC1: operator new(unsigned long)
 (vg_replace_malloc.c:261)
 ==5370== by 0x4EF14E0:
 __gnu_cxx::new_allocator<char>::allocate(unsigned long, void const*)
 (new_allocator.h:89)
 ==5370== by 0x4EF07AE: std::string::_Rep::_S_create(unsigned long,
 unsigned long, std::allocator<char> const&) (basic_string.tcc:585)
 ==5370== by 0x4EF11E8: char* std::string::_S_construct<char
 const*>(char const*, char const*, std::allocator<char> const&,
 std::forward_iterator_tag) (basic_string.tcc:139)
 ==5370== by 0x4EF16BD: char* std::string::_S_construct_aux<char
 const*>(char const*, char const*, std::allocator<char> const&,
 std::__false_type) (basic_string.h:1546)
 ==5370== by 0x4EF12D4: char* std::string::_S_construct<char
 const*>(char const*, char const*, std::allocator<char> const&)
 (basic_string.h:1562)
 ==5370== by 0x4EECFCD: std::basic_string<char, std::char_traits<char>,
 std::allocator<char> >::basic_string(char const*, std::allocator<char>
 const&) (basic_string.tcc:216)
 ==5370== by 0x405F5C:
 boost::date_time::date_facet<boost::gregorian::date, char,
 std::ostreambuf_iterator<char, std::char_traits<char> >
>::date_facet(unsigned long) (date_facet.hpp:90)
 ==5370== by 0x40467C: std::basic_ostream<char, std::char_traits<char>
>& boost::gregorian::operator<< <char, std::char_traits<char>
>(std::basic_ostream<char, std::char_traits<char> >&,
 boost::gregorian::date const&) (gregorian_io.hpp:62)
 ==5370== by 0x402A69: main (frag-boost-date-time-memoryleak-1.cc:37)
 ==5370==
 ==5370== 108 bytes in 3 blocks are possibly lost in loss record 21 of 24
 ==5370== at 0x4C27CC1: operator new(unsigned long)
 (vg_replace_malloc.c:261)
 ==5370== by 0x4EF14E0:
 __gnu_cxx::new_allocator<char>::allocate(unsigned long, void const*)
 (new_allocator.h:89)
 ==5370== by 0x4EF07AE: std::string::_Rep::_S_create(unsigned long,
 unsigned long, std::allocator<char> const&) (basic_string.tcc:585)
 ==5370== by 0x4EF11E8: char* std::string::_S_construct<char
 const*>(char const*, char const*, std::allocator<char> const&,
 std::forward_iterator_tag) (basic_string.tcc:139)
 ==5370== by 0x4EF16BD: char* std::string::_S_construct_aux<char
 const*>(char const*, char const*, std::allocator<char> const&,
 std::__false_type) (basic_string.h:1546)
 ==5370== by 0x4EF12D4: char* std::string::_S_construct<char
 const*>(char const*, char const*, std::allocator<char> const&)
 (basic_string.h:1562)
 ==5370== by 0x4EECFCD: std::basic_string<char, std::char_traits<char>,
 std::allocator<char> >::basic_string(char const*, std::allocator<char>
 const&) (basic_string.tcc:216)
 ==5370== by 0x40ABBA:
 std::back_insert_iterator<std::vector<std::string,
 std::allocator<std::string> > > std::__copy_move<false, false,
 std::random_access_iterator_tag>::__copy_m<char const (*) [17],
 std::back_insert_iterator<std::vector<std::string,
 std::allocator<std::string> > > >(char const (*) [17], char const (*)
 [17], std::back_insert_iterator<std::vector<std::string,
 std::allocator<std::string> > >) (stl_algobase.h:343)
 ==5370== by 0x40A3C4:
 std::back_insert_iterator<std::vector<std::string,
 std::allocator<std::string> > > std::__copy_move_a<false, char const (*)
 [17], std::back_insert_iterator<std::vector<std::string,
 std::allocator<std::string> > > >(char const (*) [17], char const (*)
 [17], std::back_insert_iterator<std::vector<std::string,
 std::allocator<std::string> > >) (stl_algobase.h:397)
 ==5370== by 0x409779:
 std::back_insert_iterator<std::vector<std::string,
 std::allocator<std::string> > > std::__copy_move_a2<false, char const (*)
 [17], std::back_insert_iterator<std::vector<std::string,
 std::allocator<std::string> > > >(char const (*) [17], char const (*)
 [17], std::back_insert_iterator<std::vector<std::string,
 std::allocator<std::string> > >) (stl_algobase.h:436)
 ==5370== by 0x4082C2:
 std::back_insert_iterator<std::vector<std::string,
 std::allocator<std::string> > > std::copy<char const (*) [17],
 std::back_insert_iterator<std::vector<std::string,
 std::allocator<std::string> > > >(char const (*) [17], char const (*)
 [17], std::back_insert_iterator<std::vector<std::string,
 std::allocator<std::string> > >) (stl_algobase.h:468)
 ==5370== by 0x407700: boost::date_time::special_values_formatter<char,
 std::ostreambuf_iterator<char, std::char_traits<char> >
>::special_values_formatter() (special_values_formatter.hpp:43)
 ==5370==
 ==5370== LEAK SUMMARY:
 ==5370== definitely lost: 0 bytes in 0 blocks
 ==5370== indirectly lost: 0 bytes in 0 blocks
 ==5370== possibly lost: 568 bytes in 19 blocks
 ==5370== still reachable: 976 bytes in 7 blocks
 ==5370== suppressed: 0 bytes in 0 blocks
 ==5370== Reachable blocks (those to which a pointer was found) are not
 shown.
 ==5370== To see them, rerun with: --leak-check=full --show-reachable=yes
 ==5370==
 ==5370== For counts of detected and suppressed errors, rerun with: -v
 ==5370== ERROR SUMMARY: 17 errors from 17 contexts (suppressed: 4 from 4)
 }}}

 Posting ends.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/4846#comment:2>
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