Subject: [Boost-bugs] [Boost C++ Libraries] #9147: uninitialized std::tm
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-09-21 20:44:06
#9147: uninitialized std::tm
-----------------------------------------+----------------------
Reporter: Johan Lundberg <lundberj@â¦> | Owner: viboes
Type: Bugs | Status: new
Milestone: To Be Determined | Component: chrono
Version: Boost 1.54.0 | Severity: Cosmetic
Keywords: |
-----------------------------------------+----------------------
The struct std::tm seems uninitialized, or have possibly uninitialized
members in a few places.
For example in https://svn.boost.org/trac/boost/changeset/85610
The most common patterns in boost seems to be to do
{{{
std::tm x;
std::memset(&x, 0, sizeof(x));
}}}
which seems good.
Some different/missing/suspicious initializations:
{{{
boost/log/detail/decomposed_time.hpp: std::tm res = {};
boost/chrono/io/time_point_io.hpp (possibly several)
util/gregorian.cpp - the gregorian_calendar class members
boost/date_time/microsec_time_clock.hpp
(std::tm curr possibly not fully initialized)
}}}
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/9147> 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:14 UTC