Merge ~sergiodj/ubuntu/+source/gvm-libs:fix-ftbfs-uninitialized into ubuntu/+source/gvm-libs:ubuntu/devel
Status: | Merged | ||||
---|---|---|---|---|---|
Merged at revision: | dd69f2fb35bc6e5aaf38d916854bf80424d5af60 | ||||
Proposed branch: | ~sergiodj/ubuntu/+source/gvm-libs:fix-ftbfs-uninitialized | ||||
Merge into: | ubuntu/+source/gvm-libs:ubuntu/devel | ||||
Diff against target: |
73 lines (+39/-1) 4 files modified
debian/changelog (+7/-0) debian/control (+2/-1) debian/patches/Fix-FTBFS-uninitialized-var-GCC-12.patch (+29/-0) debian/patches/series (+1/-0) |
||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Bryce Harrington (community) | Approve | ||
Canonical Server Reporter | Pending | ||
Review via email: mp+435217@code.launchpad.net |
Description of the change
This MP fixes the FTBFS that's currently affecting gvm-libs.
The problem is simple: GCC 12 is more strict when checking for uninitialized variables, and the following error was caught when compiling the package:
In function ‘ip_islocalhost’,
inlined from ‘gvm_routethrough’ at ./base/
./base/
./base/
./base/
...
To fix it, I'm initializing "addr6" with IN6ADDR_ANY_INIT, which is a convenience macro that means ::/0. If you look at the code, you'll notice that it is unlikely that "addr6" is ever uninitialized, but it's better to be safe here.
I submitted this fix to upstream as well: https:/
There's a PPA with the proposed changes here:
https:/
The package doesn't have autopkgtests.
Can you include an explanation (in the patch or bug report is fine) as to why it's initialized to IN6ADDR_ANY_INIT versus 0 or -1 or some other value?