Add a work-around for memsan
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 21 Feb 2019 06:58:24 +0000 (07:58 +0100)
committerLennart Poettering <lennart@poettering.net>
Thu, 21 Feb 2019 13:05:10 +0000 (14:05 +0100)
Fixes #11735.

src/basic/xattr-util.c

index 0ee0979..1d045f9 100644 (file)
@@ -140,7 +140,12 @@ static int parse_crtime(le64_t le, usec_t *usec) {
 }
 
 int fd_getcrtime_at(int dirfd, const char *name, usec_t *ret, int flags) {
-        struct_statx sx;
+        struct_statx sx
+#if HAS_FEATURE_MEMORY_SANITIZER
+                = {}
+#  warning "Explicitly initializing struct statx, to work around msan limitation. Please remove as soon as msan has been updated to not require this."
+#endif
+                ;
         usec_t a, b;
         le64_t le;
         size_t n;