Your message dated Tue, 19 May 2020 16:49:40 +0200
with message-id <[email protected]>
and subject line Re: Bug#957485: libusb: ftbfs with GCC-10
has caused the Debian Bug report #957485,
regarding libusb: ftbfs with GCC-10
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
957485: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=957485
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: src:libusb
Version: 2:0.1.12-32
Severity: normal
Tags: sid bullseye
User: [email protected]
Usertags: ftbfs-gcc-10

Please keep this issue open in the bug tracker for the package it
was filed for.  If a fix in another package is required, please
file a bug for the other package (or clone), and add a block in this
package. Please keep the issue open until the package can be built in
a follow-up test rebuild.

The package fails to build in a test rebuild on at least amd64 with
gcc-10/g++-10, but succeeds to build with gcc-9/g++-9. The
severity of this report will be raised before the bullseye release,
so nothing has to be done for the buster release.

The full build log can be found at:
http://people.debian.org/~doko/logs/gcc10-20200225/libusb_0.1.12-32_unstable_gcc10.log
The last lines of the build log are at the end of this report.

To build with GCC 10, either set CC=gcc-10 CXX=g++-10 explicitly,
or install the gcc, g++, gfortran, ... packages from experimental.

  apt-get -t=experimental install g++ 

Common build failures are new warnings resulting in build failures with
-Werror turned on, or new/dropped symbols in Debian symbols files.
For other C/C++ related build failures see the porting guide at
http://gcc.gnu.org/gcc-10/porting_to.html

[...]
config.status: creating usb.h
config.status: creating Doxyfile
config.status: creating config.h
config.status: executing depfiles commands
config.status: executing libtool commands
config.status: executing default commands
configure: WARNING: unrecognized options: --disable-maintainer-mode
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
   debian/rules override_dh_auto_build-arch
make[1]: Entering directory '/<<PKGBUILDDIR>>'
dh_auto_build --builddirectory build-deb
        cd build-deb && make -j4
make[2]: Entering directory '/<<PKGBUILDDIR>>/build-deb'
make  all-recursive
make[3]: Entering directory '/<<PKGBUILDDIR>>/build-deb'
Making all in .
make[4]: Entering directory '/<<PKGBUILDDIR>>/build-deb'
/bin/bash ./libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H   -I. 
-Wdate-time -D_FORTIFY_SOURCE=2 -Werror  -g -O2 
-fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat 
-Werror=format-security -Wall -c -o usb.lo ../usb.c
/bin/bash ./libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H   -I. 
-Wdate-time -D_FORTIFY_SOURCE=2 -Werror  -g -O2 
-fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat 
-Werror=format-security -Wall -c -o error.lo ../error.c
/bin/bash ./libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H   -I. 
-Wdate-time -D_FORTIFY_SOURCE=2 -Werror  -g -O2 
-fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat 
-Werror=format-security -Wall -c -o descriptors.lo ../descriptors.c
/bin/bash ./libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H   -I. 
-Wdate-time -D_FORTIFY_SOURCE=2 -Werror  -g -O2 
-fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat 
-Werror=format-security -Wall -c -o linux.lo ../linux.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -Wdate-time -D_FORTIFY_SOURCE=2 
-Werror -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong 
-Wformat -Werror=format-security -Wall -c ../error.c  -fPIC -DPIC -o 
.libs/error.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -Wdate-time -D_FORTIFY_SOURCE=2 
-Werror -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong 
-Wformat -Werror=format-security -Wall -c ../linux.c  -fPIC -DPIC -o 
.libs/linux.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -Wdate-time -D_FORTIFY_SOURCE=2 
-Werror -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong 
-Wformat -Werror=format-security -Wall -c ../usb.c  -fPIC -DPIC -o .libs/usb.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -Wdate-time -D_FORTIFY_SOURCE=2 
-Werror -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong 
-Wformat -Werror=format-security -Wall -c ../descriptors.c  -fPIC -DPIC -o 
.libs/descriptors.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -Wdate-time -D_FORTIFY_SOURCE=2 
-Werror -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong 
-Wformat -Werror=format-security -Wall -c ../error.c -o error.o >/dev/null 2>&1
/bin/bash ./libtool  --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H   -I. 
-Wdate-time -D_FORTIFY_SOURCE=2  -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. 
-fstack-protector-strong -Wformat -Werror=format-security -c -o usbpp.lo 
../usbpp.cpp
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -Wdate-time -D_FORTIFY_SOURCE=2 
-Werror -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong 
-Wformat -Werror=format-security -Wall -c ../usb.c -o usb.o >/dev/null 2>&1
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -Wdate-time -D_FORTIFY_SOURCE=2 -g 
-O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat 
-Werror=format-security -c ../usbpp.cpp  -fPIC -DPIC -o .libs/usbpp.o
In file included from /usr/include/string.h:495,
                 from ../linux.c:11:
In function ‘strncpy’,
    inlined from ‘usb_os_find_busses’ at ../linux.c:361:5:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:106:10: error: 
‘__builtin_strncpy’ offset [275, 4095] from the object at ‘entry’ is out of the 
bounds of referenced subobject ‘d_name’ with type ‘char[256]’ at offset 19 
[-Werror=array-bounds]
  106 |   return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/dirent.h:61,
                 from ../linux.c:16:
../linux.c: In function ‘usb_os_find_busses’:
/usr/include/x86_64-linux-gnu/bits/dirent.h:33:10: note: subobject ‘d_name’ 
declared here
   33 |     char d_name[256];  /* We must not include limits.h! */
      |          ^~~~~~
In file included from /usr/include/string.h:495,
                 from ../linux.c:11:
In function ‘strncpy’,
    inlined from ‘usb_os_find_devices’ at ../linux.c:415:5:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:106:10: error: 
‘__builtin_strncpy’ offset [275, 4095] from the object at ‘entry’ is out of the 
bounds of referenced subobject ‘d_name’ with type ‘char[256]’ at offset 19 
[-Werror=array-bounds]
  106 |   return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/dirent.h:61,
                 from ../linux.c:16:
../linux.c: In function ‘usb_os_find_devices’:
/usr/include/x86_64-linux-gnu/bits/dirent.h:33:10: note: subobject ‘d_name’ 
declared here
   33 |     char d_name[256];  /* We must not include limits.h! */
      |          ^~~~~~
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -Wdate-time -D_FORTIFY_SOURCE=2 
-Werror -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong 
-Wformat -Werror=format-security -Wall -c ../descriptors.c -o descriptors.o 
>/dev/null 2>&1
cc1: all warnings being treated as errors
make[4]: *** [Makefile:694: linux.lo] Error 1
make[4]: *** Waiting for unfinished jobs....
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -Wdate-time -D_FORTIFY_SOURCE=2 -g 
-O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat 
-Werror=format-security -c ../usbpp.cpp -o usbpp.o >/dev/null 2>&1
make[4]: Leaving directory '/<<PKGBUILDDIR>>/build-deb'
make[3]: *** [Makefile:799: all-recursive] Error 1
make[3]: Leaving directory '/<<PKGBUILDDIR>>/build-deb'
make[2]: *** [Makefile:508: all] Error 2
make[2]: Leaving directory '/<<PKGBUILDDIR>>/build-deb'
dh_auto_build: error: cd build-deb && make -j4 returned exit code 2
make[1]: *** [debian/rules:17: override_dh_auto_build-arch] Error 25
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
make: *** [debian/rules:4: build] Error 2
dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2

--- End Message ---
--- Begin Message ---
On 2020-04-18 01:18, Aurelien Jarno wrote:
> clone 957485 -1
> reassign -1 gcc-10
> retitle -1 gcc-10: bogus array-bounds error when using strncpy on strings 
> embedded in a structure
> block 957485 by -1
> thanks
> 
> On 2020-04-17 11:05, Matthias Klose wrote:
> > Package: src:libusb
> > Version: 2:0.1.12-32
> > Severity: normal
> > Tags: sid bullseye
> > User: [email protected]
> > Usertags: ftbfs-gcc-10
> > 
> > Please keep this issue open in the bug tracker for the package it
> > was filed for.  If a fix in another package is required, please
> > file a bug for the other package (or clone), and add a block in this
> > package. Please keep the issue open until the package can be built in
> > a follow-up test rebuild.
> > 
> > The package fails to build in a test rebuild on at least amd64 with
> > gcc-10/g++-10, but succeeds to build with gcc-9/g++-9. The
> > severity of this report will be raised before the bullseye release,
> > so nothing has to be done for the buster release.
> 
> [ snip ]
> 
> > libtool: compile:  g++ -DHAVE_CONFIG_H -I. -Wdate-time -D_FORTIFY_SOURCE=2 
> > -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong 
> > -Wformat -Werror=format-security -c ../usbpp.cpp  -fPIC -DPIC -o 
> > .libs/usbpp.o
> > In file included from /usr/include/string.h:495,
> >                  from ../linux.c:11:
> > In function ‘strncpy’,
> >     inlined from ‘usb_os_find_busses’ at ../linux.c:361:5:
> > /usr/include/x86_64-linux-gnu/bits/string_fortified.h:106:10: error: 
> > ‘__builtin_strncpy’ offset [275, 4095] from the object at ‘entry’ is out of 
> > the bounds of referenced subobject ‘d_name’ with type ‘char[256]’ at offset 
> > 19 [-Werror=array-bounds]
> >   106 |   return __builtin___strncpy_chk (__dest, __src, __len, __bos 
> > (__dest));
> >       |          
> > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > In file included from /usr/include/dirent.h:61,
> >                  from ../linux.c:16:
> > ../linux.c: In function ‘usb_os_find_busses’:
> > /usr/include/x86_64-linux-gnu/bits/dirent.h:33:10: note: subobject ‘d_name’ 
> > declared here
> >    33 |     char d_name[256];  /* We must not include limits.h! */
> >       |          ^~~~~~
> 
> This is a bogus warning, assuming the string is not properly null
> terminated. This is not an acceptable assumption, otherwise it would not
> even be possible to call strlen() without a warning.
> 
> Please see the attached file for a simple reproducer.

The bug has been closed on the GCC side. Closing the bug.

-- 
Aurelien Jarno                          GPG: 4096R/1DDD8C9B
[email protected]                 http://www.aurel32.net

--- End Message ---

Reply via email to