FTBFS [s390x,ppc64el,riscv64]: -Wmaybe-uninitialized

Bug #1990194 reported by Andreas Hasenack
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
pam-p11 (Ubuntu)
Fix Released
Undecided
Andreas Hasenack

Bug Description

Builds on s390x, ppc64el, riscv64 are failing with a maybe-unitialized error:

gcc -DHAVE_CONFIG_H -I. -I.. -Wdate-time -D_FORTIFY_SOURCE=2 -DLOCALEDIR=\"/usr/share/locale\" -DLIBDIR=\"/lib/riscv64-linux-gnu\" -DTEST -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wno-error=deprecated-declarations -Wall -Wextra -Wno-unused-parameter -Werror -c -o test_passwd-pam_p11.o `test -f 'pam_p11.c' || echo './'`pam_p11.c
base64.c: In function ‘sc_base64_decode’:
base64.c:89:36: error: ‘i’ may be used uninitialized [-Werror=maybe-uninitialized]
   89 | *out++ = i >> s;
      | ~~^~~~
base64.c:79:22: note: ‘i’ was declared here
   79 | unsigned int i;
      | ^
base64.c:94:20: error: ‘skip’ may be used uninitialized [-Werror=maybe-uninitialized]
   94 | in += skip;
      | ^~
base64.c:78:25: note: ‘skip’ was declared here
   78 | int len = 0, r, skip;
      | ^~~~

On amd64 this does not happen.

Initially I thought it was due to ppc64el using -O3. And, in fact, rebuilding it on ppc64 with -O2 doesn't trip this problem, but OTOH building it on amd64 *with* -O3 also does not trigger the problem. Furthermore, s390x and riscv64 are also using -O2 and the build is failing there too.

Previous builds in LP passed with gcc-11, so this looks like it's something new in gcc-12.

Tags: ftbfs

Related branches

summary: - FTBFS [s390x,ppc64el,riscv64]: maybe-unitialized
+ FTBFS [s390x,ppc64el,riscv64]: maybe-uninitialized
Revision history for this message
Andreas Hasenack (ahasenack) wrote : Re: FTBFS [s390x,ppc64el,riscv64]: maybe-uninitialized
summary: - FTBFS [s390x,ppc64el,riscv64]: maybe-uninitialized
+ FTBFS [s390x,ppc64el,riscv64]: -Wmaybe-uninitialized
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Uploaded

Changed in pam-p11 (Ubuntu):
assignee: nobody → Andreas Hasenack (ahasenack)
status: New → In Progress
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package pam-p11 - 0.3.1-1.1ubuntu1

---------------
pam-p11 (0.3.1-1.1ubuntu1) kinetic; urgency=medium

  * d/p/ftbfs-uninitialized-variables.patch: initialize variables to fix
    ftbfs with gcc-12 in some architectures (LP: #1990194)

 -- Andreas Hasenack <email address hidden> Thu, 22 Sep 2022 12:24:51 -0300

Changed in pam-p11 (Ubuntu):
status: Fix Committed → 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.