FTBFS [s390x,ppc64el,riscv64]: -Wmaybe-uninitialized
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=
base64.c: In function ‘sc_base64_decode’:
base64.c:89:36: error: ‘i’ may be used uninitialized [-Werror=
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=
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.
Related branches
- git-ubuntu bot: Approve
- Sergio Durigan Junior (community): Approve
- Canonical Server Reporter: Pending requested
-
Diff: 75 lines (+43/-1)4 files modifieddebian/changelog (+7/-0)
debian/control (+2/-1)
debian/patches/ftbfs-uninitialized-variables.patch (+33/-0)
debian/patches/series (+1/-0)
summary: |
- FTBFS [s390x,ppc64el,riscv64]: maybe-unitialized + FTBFS [s390x,ppc64el,riscv64]: maybe-uninitialized |
Filed upstream issue at https:/ /github. com/OpenSC/ pam_p11/ issues/ 24