valgrind and boost.datetime

Hi, 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. Thanks gcc 4.4.1 boost 1.39.0

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

AMDG Matwey V. Kornilov wrote:
Steven Watanabe wrote:
What happens if you change line 107 to
tm tm_value = tm();
Nothing happens. Result is the same.
I just tried with an older version and changing that line in both gather_month_strings and gather_weekday_strings seems to fix the problem. In Christ, Steven Watanabe
participants (2)
-
Matwey V. Kornilov
-
Steven Watanabe