|
Boost Users : |
Subject: Re: [Boost-users] valgrind and boost.datetime
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2010-02-25 13:32:26
AMDG
Matwey V. Kornilov wrote:
> I initialize time input facet in such way:
>
> new boost::posix_time::time_input_facet( std::string("%Y-%m-%d %H:%M:
> %S") )
>
> and
>
> valgrind --track-origins=yes
>
> tells me:
>
> ==30317== Conditional jump or move depends on uninitialised value(s)
> ...
> ==30317== Uninitialised value was created by a stack allocation
> ==30317== at 0x806C486: std::vector<std::basic_string<char,
> std::char_traits<char>, std::allocator<char> >,
> std::allocator<std::basic_string<char, std::char_traits<char>,
> std::allocator<char> > > >
> boost::date_time::gather_weekday_strings<char>(std::locale const&, bool)
> (strings_from_facet.hpp:84)
>
> Is there way to fix the problem? The problem is located within boost
> according to valgrind, but I assume that it can be produced by incorrect
> usage.
>
What happens if you change line 107 to
tm tm_value = tm();
In Christ,
Steven Watanabe
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net