Andrew Morrow: The attached patch updates the initialization of the 'struct tm' in
__time_get_storage<char> to match the initialization behavior in __time_get_storage<wchar>. Without the initialization, valgrind reports errors in the subsequent calls to strftime_l. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@161196 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
069bdd52c1
commit
cd99236231
@ -4864,7 +4864,7 @@ template <>
|
|||||||
void
|
void
|
||||||
__time_get_storage<char>::init(const ctype<char>& ct)
|
__time_get_storage<char>::init(const ctype<char>& ct)
|
||||||
{
|
{
|
||||||
tm t;
|
tm t = {0};
|
||||||
char buf[100];
|
char buf[100];
|
||||||
// __weeks_
|
// __weeks_
|
||||||
for (int i = 0; i < 7; ++i)
|
for (int i = 0; i < 7; ++i)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user