procenv is FTBFS in Groovy

Bug #1889138 reported by Matthew Ruffell
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
dpkg (Ubuntu)
Fix Released
Undecided
Unassigned
Groovy
Fix Released
Undecided
Unassigned
procenv (Debian)
Fix Released
Unknown
procenv (Ubuntu)
Fix Released
Undecided
Lukas Märdian
Groovy
Fix Released
Undecided
Lukas Märdian
sbuild (Ubuntu)
Fix Released
Undecided
Unassigned
Groovy
Fix Released
Undecided
Unassigned

Bug Description

[Impact]

procenv is currently FTBFS on Ubuntu 20.10 Groovy Gorilla with GCC 10
version (Ubuntu 10.2.0-3ubuntu1) 10.2.0.

Details:

```
gcc -DHAVE_CONFIG_H -I. -I.. -I . -I ./platform -I ./platform/linux -D PROCENV_PLATFORM_LINUX -pedantic -std=gnu99 -Wall -Wunused -fstack-protector -Wformat -fdata-sections -ffunction-sections -Werror -g -O2 -MT platform/linux/procenv-platform.o -MD -MP -MF platform/linux/.deps/procenv-platform.Tpo -c -o platform/linux/procenv-platform.o `test -f 'platform/linux/platform.c' || echo './'`platform/linux/platform.c
platform/linux/platform.c: In function ‘handle_proc_branch_linux’:
platform/linux/platform.c:1266:21: error: ‘%s’ directive writing up to 1017 bytes into a region of size 16 [-Werror=format-overflow=]
 1265 | p += 1+strlen ("Name:"); /* jump over tab char */
      | ~~~~~~~~~~~~~~~~~~~~~~~
 1266 | sprintf (name, "%s", p);
      | ^~
In file included from /usr/include/stdio.h:867,
                 from ./platform.h:22,
                 from platform/linux/platform-linux.h:25,
                 from platform/linux/platform.c:19:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 1 and 1018 bytes into a destination of size 16
   36 | return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 | __bos (__s), __fmt, __va_arg_pack ());
      | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
platform/linux/platform.c:1271:21: error: ‘%s’ directive writing up to 1017 bytes into a region of size 16 [-Werror=format-overflow=]
 1270 | p += 1+strlen ("PPid:"); /* jump over tab char */
      | ~~~~~~~~~~~~~~~~~~~~~~~
 1271 | sprintf (ppid, "%s", p);
      | ^~
In file included from /usr/include/stdio.h:867,
                 from ./platform.h:22,
                 from platform/linux/platform-linux.h:25,
                 from platform/linux/platform.c:19:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 1 and 1018 bytes into a destination of size 16
   36 | return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 | __bos (__s), __fmt, __va_arg_pack ());
      | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

```

Builds fine with GCC 9 in Ubuntu 20.04, seems GCC 10 changed the behaviour of
-Werror=format-overflow.

Upstream Issue:

https://github.com/jamesodhunt/procenv/issues/15

tags: added: ftbfs groovy
Lukas Märdian (slyon)
Changed in procenv (Ubuntu Groovy):
assignee: nobody → Lukas Märdian (slyon)
Revision history for this message
Lukas Märdian (slyon) wrote :
Revision history for this message
Lukas Märdian (slyon) wrote :
Lukas Märdian (slyon)
Changed in procenv (Ubuntu Groovy):
assignee: Lukas Märdian (slyon) → nobody
status: New → Confirmed
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Submitted to Debian & Upstream - good
Changelog entries - good
DEP3 headers - ok
PPA built with gcc-10 at https://launchpad.net/~slyon/+archive/ubuntu/netplan/+packages - ok

Agreed, sponsoring into groovy.
Please track proposed migration of it and fix issues if there are any.

P.S. It would be great if you could also reply to the Debian bug pointing to your fix and the upstream report.

Lukas Märdian (slyon)
tags: added: update-excuses
Lukas Märdian (slyon)
Changed in procenv (Ubuntu Groovy):
assignee: nobody → Lukas Märdian (slyon)
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package procenv - 0.50-1ubuntu3

---------------
procenv (0.50-1ubuntu3) groovy; urgency=medium

  * Fix GCC-10 ftbfs, by telling the compiler the max length to be written.
    (Closes: #966883) (LP: #1889138)

 -- Lukas Märdian <email address hidden> Mon, 10 Aug 2020 14:40:57 +0200

Changed in procenv (Ubuntu Groovy):
status: Confirmed → Fix Released
Lukas Märdian (slyon)
Changed in dpkg (Ubuntu Groovy):
status: New → Fix Released
Changed in sbuild (Ubuntu Groovy):
status: New → Fix Released
Lukas Märdian (slyon)
tags: added: update-excuse
removed: update-excuses
Changed in procenv (Debian):
status: Unknown → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.