]> git.ipfire.org Git - thirdparty/zstd.git/commit
fixed timespec_get() initialization bug on some targets 1581/head
authorYann Collet <cyan@fb.com>
Thu, 11 Apr 2019 20:46:30 +0000 (13:46 -0700)
committerYann Collet <cyan@fb.com>
Thu, 11 Apr 2019 20:46:30 +0000 (13:46 -0700)
commit1e01560b83389e1fdf91eb9a8311d9a1c69abdce
tree23af22ebee4cfed70b4ce1ba04bb25730112fe4b
parent058da605cb37dd5cdbe24c9c404020be52a9e6ab
fixed timespec_get() initialization bug on some targets

not sure why, but msan fires an "unitialized variable" error
when time gets properly initialized by timespec_get().
Maybe in some cases, not all bytes of the structure are initialized ?
Or maybe msan fails to detect the initialization ?

Anyway, pre-initializing the variable before passing it to timespec_get() works.
programs/timefn.c