[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#958062: marked as done (gcc-10: bogus array-bounds error when using strncpy on strings embedded in a structure)



Your message dated Sat, 25 Apr 2020 16:18:49 +0000
with message-id <E1jSNVx-0001CL-CJ@fasolo.debian.org>
and subject line Bug#958062: fixed in gcc-10 10-20200425-1
has caused the Debian Bug report #958062,
regarding gcc-10: bogus array-bounds error when using strncpy on strings embedded in a structure
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 owner@bugs.debian.org
immediately.)


-- 
958062: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=958062
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: src:libusb
Version: 2:0.1.12-32
Severity: normal
Tags: sid bullseye
User: debian-gcc@lists.debian.org
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 ---
Source: gcc-10
Source-Version: 10-20200425-1
Done: Matthias Klose <doko@debian.org>

We believe that the bug you reported is fixed in the latest version of
gcc-10, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 958062@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Matthias Klose <doko@debian.org> (supplier of updated gcc-10 package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Sat, 25 Apr 2020 18:07:48 +0200
Source: gcc-10
Architecture: source
Version: 10-20200425-1
Distribution: unstable
Urgency: medium
Maintainer: Debian GCC Maintainers <debian-gcc@lists.debian.org>
Changed-By: Matthias Klose <doko@debian.org>
Closes: 954898 958062
Changes:
 gcc-10 (10-20200425-1) unstable; urgency=medium
 .
   * GCC snapshot, taken from the trunk (20200425, cf3f7b309ffd).
     - Fix PR middle-end/94647. Closes: #958062.
   * Fix local patch for PR jit/87808. Closes: #954898.
   * gcc-snapshot: Depend on nvptx-tools with the nvptx offload compiler.
   * Provide symlinks for the offload target tools in <gcclibdir>/accel/<target>.
   * Don't include lib*gomp1 and libgcc4 in the control file, when not building
     the common libraries.
   * Build libphobos on powerpc*, libdruntime only.
Checksums-Sha1:
 478c3adb860d1e6e64a07cd5a8dd57398e27b0bc 28208 gcc-10_10-20200425-1.dsc
 a977a2a3bf897534db6e003f1b03725e1179822a 89230816 gcc-10_10-20200425.orig.tar.gz
 c5eee828e09edc6258df337bce09ad1729af01b4 1387112 gcc-10_10-20200425-1.debian.tar.xz
 916bcb9a51a139d7fe9a0da73c67eaa137ba28d1 10787 gcc-10_10-20200425-1_source.buildinfo
Checksums-Sha256:
 91c6783ec9e08ba11d0b4f41f500c0f49499e4db33284dab686324bda75ae18c 28208 gcc-10_10-20200425-1.dsc
 43abccd7a584cda3364fe9a20ca59a38ba8d557719502f0ac94d1a223348944f 89230816 gcc-10_10-20200425.orig.tar.gz
 2ce9845a9be4d2193c2aa2cf010a7fe83abe03902f7102608c93efe97aab3027 1387112 gcc-10_10-20200425-1.debian.tar.xz
 b1eb1752a255ce708bc169a8c0839d9dba8e7575e79286c83da0b4fff3f2bf0c 10787 gcc-10_10-20200425-1_source.buildinfo
Files:
 51fed806d9e364c72cc8e83700bab4b6 28208 devel optional gcc-10_10-20200425-1.dsc
 d7256d5a8c0446b523e9091573a89352 89230816 devel optional gcc-10_10-20200425.orig.tar.gz
 f986924fd4836dbf13466927f29d366c 1387112 devel optional gcc-10_10-20200425-1.debian.tar.xz
 0d9906bd7e1e8dd24760c6c6a4c57b07 10787 devel optional gcc-10_10-20200425-1_source.buildinfo

-----BEGIN PGP SIGNATURE-----

iQJEBAEBCAAuFiEE1WVxuIqLuvFAv2PWvX6qYHePpvUFAl6kYJcQHGRva29AZGVi
aWFuLm9yZwAKCRC9fqpgd4+m9dj4D/oCPX+Agda4C+gETSbvQ+SgxilsSxbAT6en
bY8hms99w4yVcnUbbOnNPuqvDmW3R4IolroobdJKrRoeVpD3JrwF3LL9JO1mL5IY
UNaoLCKBgKoLSAu/360yHcl/vDe9OA6QtdG0dF98er8O7e3qP1gT3/RiZztjyiNf
Unzq5YyX/XOR4emhybbagYLdiiwn6b428d/+THMxVQRm9UMFECFiO1VI7YPxh4df
+xRABvYXytRICkyLMNSgDUgShsBl3FiJvQsE62ElEjd6dH4eJ/w5xs6jaVuO/kVV
LyJOy6bOJggbKFTfhmAHMYylGSG3g7tAgNRFpij/zuvaU02CHyVMKwtV/xGSuKXn
/LzOU8GCvOCg/qMBPFOqOVQb+U3ziJZshENUuURp02EH0nwog/tcLJGQ8w0lrL3B
CLhM2ILrJLhFZPoxIb5rS6Pw8k+uKehUYb67fTZAPZEgbr1R+IPmI/nmweTSq45R
u5RffGJ5aTFkpxSDDaJmE7mlRKTzKt1dhZ84yuMnW+L/JtWB10yG3OPOSrdl0kO0
XO3IIg2n88dUbEYutDwq3/dsdivKa3vGLWWu38tQRLFibK4im18QGJaqZVS2FUFO
PDMo/DvsUdrXivMV3maUIqTOtg2xvx4OIDFNbikfF/lyjmWL/t8sBswmRN6xT1ms
ZKx6YrHs2g==
=etWb
-----END PGP SIGNATURE-----

--- End Message ---

Reply to: