FYI s390x: 'current.ctime.tv_nsec' may be used uninitialized in this function
Carlos O'Donell
carlos@redhat.com
Fri Feb 14 22:12:00 GMT 2020
Florian,
Patsy was doing a Fedora Rawhide sync with glibc master and noticed the
testsuite has stopped building in this week's sync on s390x.
I haven't looked into this but I thought I should drop this update to the
list if anyone else ran into this. I expect we need to fix something here
to avoid the compiler's -Werror=maybe-uninitialized.
gcc tst-file_change_detection.c -c -std=gnu11 -fgnu89-inline -O2 -g -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=zEC12 -mtune=z13 -fasynchronous-unwind-tables -fstack-clash-protection -Wall -Wwrite-strings -Wundef -Werror -fmerge-all-constants -frounding-math -fstack-protector-strong -Wstrict-prototypes -Wold-style-definition -fmath-errno -mlong-double-128 -I../include -I/builddir/build/BUILD/glibc-2.31.9000-113-g5e6efd3ec2/build-s390x-redhat-linux/io -I/builddir/build/BUILD/glibc-2.31.9000-113-g5e6efd3ec2/build-s390x-redhat-linux -I../sysdeps/unix/sysv/linux/s390/s390-64 -I../sysdeps/unix/sysv/linux/wordsize-64 -I../sysdeps/unix/sysv/linux/s390/fpu -I../sysdeps/s390/fpu -I../sysdeps/unix/sysv/linux/s390 -I../sysdeps/s390/nptl -I../sysdeps/ieee754/ldbl-64-128 -I../sysdeps/ieee754/ldbl-opt -I../sysdeps/unix/sysv/linux/include -I../sysdeps/unix/sysv/linux -I../sysdeps/nptl -I../sysdeps/pthread -I../sysdeps/gnu -I../sysdeps/unix/inet -I../sysdeps/unix/sysv -I../sysdeps/unix -I../sysdeps/posix -I../sysdeps/s390/s390-64 -I../sysdeps/wordsize-64 -I../sysdeps/ieee754/dbl-64/wordsize-64 -I../sysdeps/s390/multiarch -I../sysdeps/s390 -I../sysdeps/ieee754/ldbl-128 -I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754/flt-32 -I../sysdeps/ieee754 -I../sysdeps/generic -I.. -I../libio -I. -nostdinc -isystem /usr/lib/gcc/s390x-redhat-linux/10/include -isystem /usr/include -D_LIBC_REENTRANT -include /builddir/build/BUILD/glibc-2.31.9000-113-g5e6efd3ec2/build-s390x-redhat-linux/libc-modules.h -DMODULE_NAME=testsuite -include ../include/libc-symbols.h -DTOP_NAMESPACE=glibc -o /builddir/build/BUILD/glibc-2.31.9000-113-g5e6efd3ec2/build-s390x-redhat-linux/io/tst-file_change_detection.o -MD -MP -MF /builddir/build/BUILD/glibc-2.31.9000-113-g5e6efd3ec2/build-s390x-redhat-linux/io/tst-file_change_detection.o.dt -MT /builddir/build/BUILD/glibc-2.31.9000-113-g5e6efd3ec2/build-s390x-redhat-linux/io/tst-file_change_detection.o
In file included from tst-file_change_detection.c:23:
tst-file_change_detection.c: In function 'do_test':
../include/file_change_detection.h:58:7: error: 'current.ctime.tv_nsec' may be used uninitialized in this function [-Werror=maybe-uninitialized]
53 | return left->size == right->size
| ~~~~~~~~~~~~~~~~~~~~~~~~~
54 | && left->ino == right->ino
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
55 | && left->mtime.tv_sec == right->mtime.tv_sec
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
56 | && left->mtime.tv_nsec == right->mtime.tv_nsec
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
57 | && left->ctime.tv_sec == right->ctime.tv_sec
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
58 | && left->ctime.tv_nsec == right->ctime.tv_nsec;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tst-file_change_detection.c:173:40: note: 'current.ctime.tv_nsec' was declared here
173 | struct file_change_detection current;
| ^~~~~~~
In file included from tst-file_change_detection.c:23:
../include/file_change_detection.h:57:7: error: 'current.ctime.tv_sec' may be used uninitialized in this function [-Werror=maybe-uninitialized]
53 | return left->size == right->size
| ~~~~~~~~~~~~~~~~~~~~~~~~~
54 | && left->ino == right->ino
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
55 | && left->mtime.tv_sec == right->mtime.tv_sec
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
56 | && left->mtime.tv_nsec == right->mtime.tv_nsec
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
57 | && left->ctime.tv_sec == right->ctime.tv_sec
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tst-file_change_detection.c:173:40: note: 'current.ctime.tv_sec' was declared here
173 | struct file_change_detection current;
| ^~~~~~~
In file included from tst-file_change_detection.c:23:
../include/file_change_detection.h:56:7: error: 'current.mtime.tv_nsec' may be used uninitialized in this function [-Werror=maybe-uninitialized]
53 | return left->size == right->size
| ~~~~~~~~~~~~~~~~~~~~~~~~~
54 | && left->ino == right->ino
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
55 | && left->mtime.tv_sec == right->mtime.tv_sec
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
56 | && left->mtime.tv_nsec == right->mtime.tv_nsec
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tst-file_change_detection.c:173:40: note: 'current.mtime.tv_nsec' was declared here
173 | struct file_change_detection current;
| ^~~~~~~
In file included from tst-file_change_detection.c:23:
../include/file_change_detection.h:55:7: error: 'current.mtime.tv_sec' may be used uninitialized in this function [-Werror=maybe-uninitialized]
53 | return left->size == right->size
| ~~~~~~~~~~~~~~~~~~~~~~~~~
54 | && left->ino == right->ino
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
55 | && left->mtime.tv_sec == right->mtime.tv_sec
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tst-file_change_detection.c:173:40: note: 'current.mtime.tv_sec' was declared here
173 | struct file_change_detection current;
| ^~~~~~~
In file included from tst-file_change_detection.c:23:
../include/file_change_detection.h:54:7: error: 'current.ino' may be used uninitialized in this function [-Werror=maybe-uninitialized]
53 | return left->size == right->size
| ~~~~~~~~~~~~~~~~~~~~~~~~~
54 | && left->ino == right->ino
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
tst-file_change_detection.c:173:40: note: 'current.ino' was declared here
173 | struct file_change_detection current;
| ^~~~~~~
In file included from tst-file_change_detection.c:23:
../include/file_change_detection.h:58:7: error: 'current.size' may be used uninitialized in this function [-Werror=maybe-uninitialized]
53 | return left->size == right->size
| ~~~~~~~~~~~~~~~~~~~~~~~~~
54 | && left->ino == right->ino
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
55 | && left->mtime.tv_sec == right->mtime.tv_sec
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
56 | && left->mtime.tv_nsec == right->mtime.tv_nsec
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
57 | && left->ctime.tv_sec == right->ctime.tv_sec
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
58 | && left->ctime.tv_nsec == right->ctime.tv_nsec;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tst-file_change_detection.c:173:40: note: 'current.size' was declared here
173 | struct file_change_detection current;
| ^~~~~~~
In file included from tst-file_change_detection.c:23:
../include/file_change_detection.h:58:7: error: 'initial.ctime.tv_nsec' may be used uninitialized in this function [-Werror=maybe-uninitialized]
53 | return left->size == right->size
| ~~~~~~~~~~~~~~~~~~~~~~~~~
54 | && left->ino == right->ino
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
55 | && left->mtime.tv_sec == right->mtime.tv_sec
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
56 | && left->mtime.tv_nsec == right->mtime.tv_nsec
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
57 | && left->ctime.tv_sec == right->ctime.tv_sec
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
58 | && left->ctime.tv_nsec == right->ctime.tv_nsec;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tst-file_change_detection.c:168:36: note: 'initial.ctime.tv_nsec' was declared here
168 | struct file_change_detection initial;
| ^~~~~~~
In file included from tst-file_change_detection.c:23:
../include/file_change_detection.h:57:7: error: 'initial.ctime.tv_sec' may be used uninitialized in this function [-Werror=maybe-uninitialized]
53 | return left->size == right->size
| ~~~~~~~~~~~~~~~~~~~~~~~~~
54 | && left->ino == right->ino
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
55 | && left->mtime.tv_sec == right->mtime.tv_sec
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
56 | && left->mtime.tv_nsec == right->mtime.tv_nsec
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
57 | && left->ctime.tv_sec == right->ctime.tv_sec
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tst-file_change_detection.c:168:36: note: 'initial.ctime.tv_sec' was declared here
168 | struct file_change_detection initial;
| ^~~~~~~
In file included from tst-file_change_detection.c:23:
../include/file_change_detection.h:56:7: error: 'initial.mtime.tv_nsec' may be used uninitialized in this function [-Werror=maybe-uninitialized]
53 | return left->size == right->size
| ~~~~~~~~~~~~~~~~~~~~~~~~~
54 | && left->ino == right->ino
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
55 | && left->mtime.tv_sec == right->mtime.tv_sec
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
56 | && left->mtime.tv_nsec == right->mtime.tv_nsec
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tst-file_change_detection.c:168:36: note: 'initial.mtime.tv_nsec' was declared here
168 | struct file_change_detection initial;
| ^~~~~~~
In file included from tst-file_change_detection.c:23:
../include/file_change_detection.h:55:7: error: 'initial.mtime.tv_sec' may be used uninitialized in this function [-Werror=maybe-uninitialized]
53 | return left->size == right->size
| ~~~~~~~~~~~~~~~~~~~~~~~~~
54 | && left->ino == right->ino
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
55 | && left->mtime.tv_sec == right->mtime.tv_sec
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tst-file_change_detection.c:168:36: note: 'initial.mtime.tv_sec' was declared here
168 | struct file_change_detection initial;
| ^~~~~~~
In file included from tst-file_change_detection.c:23:
../include/file_change_detection.h:58:7: error: 'initial.size' may be used uninitialized in this function [-Werror=maybe-uninitialized]
53 | return left->size == right->size
| ~~~~~~~~~~~~~~~~~~~~~~~~~
54 | && left->ino == right->ino
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
55 | && left->mtime.tv_sec == right->mtime.tv_sec
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
56 | && left->mtime.tv_nsec == right->mtime.tv_nsec
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
57 | && left->ctime.tv_sec == right->ctime.tv_sec
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
58 | && left->ctime.tv_nsec == right->ctime.tv_nsec;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tst-file_change_detection.c:168:36: note: 'initial.size' was declared here
168 | struct file_change_detection initial;
| ^~~~~~~
cc1: all warnings being treated as errors
make[2]: *** [../o-iterator.mk:9: /builddir/build/BUILD/glibc-2.31.9000-113-g5e6efd3ec2/build-s390x-redhat-linux/io/tst-file_change_detection.o] Error 1
make[2]: Leaving directory '/builddir/build/BUILD/glibc-2.31.9000-113-g5e6efd3ec2/io'
make[2]: *** Waiting for unfinished jobs....
--
Cheers,
Carlos.
More information about the Libc-alpha
mailing list