Package: memcached Version: 1.6.12+dfsg-2 Severity: minor Tags: patch User: [email protected] Usertags: origin-ubuntu jammy ubuntu-patch
Hi Chris, On ppc64el in Ubuntu, memcached is failing to build from source because this Ubuntu port builds with -O3 by default, and at that optimization level, gcc detects that a couple of variables may be used without being set. I haven't traced the code to confirm whether this is a false-positive, because it's easy enough to fix the failure by initializing the variables instead of overriding the compiler warning (which can be useful for finding real bugs). Please find attached the patch I've uploaded to Ubuntu for this issue. Thanks for considering, -- Steve Langasek Give me a lever long enough and a Free OS Debian Developer to set it on, and I can move the world. Ubuntu Developer https://www.debian.org/ [email protected] [email protected]
diff -Nru memcached-1.6.12+dfsg/debian/patches/series memcached-1.6.12+dfsg/debian/patches/series --- memcached-1.6.12+dfsg/debian/patches/series 2021-11-23 08:59:31.000000000 -0800 +++ memcached-1.6.12+dfsg/debian/patches/series 2021-12-08 16:28:55.000000000 -0800 @@ -3,3 +3,4 @@ 0003-Uses-retry-to-wait-up-to-5-seconds-for-the-killed-pr.patch 0005-Source-etc-default-memcached-in-etc-init.d-memcached.patch 0006-restore-systemd-sandboxing.patch +uninitialized-variables.patch diff -Nru memcached-1.6.12+dfsg/debian/patches/uninitialized-variables.patch memcached-1.6.12+dfsg/debian/patches/uninitialized-variables.patch --- memcached-1.6.12+dfsg/debian/patches/uninitialized-variables.patch 1969-12-31 16:00:00.000000000 -0800 +++ memcached-1.6.12+dfsg/debian/patches/uninitialized-variables.patch 2021-12-08 16:30:48.000000000 -0800 @@ -0,0 +1,29 @@ +Description: fix an error due to use of a possibly uninitialized variable + gcc detects that this variable may be used without being initialized. Just + initialize it to fix the error. +Author: Steve Langasek <[email protected]> +Last-Update: 2021-12-08 +Forwarded: no + +Index: memcached-1.6.12+dfsg/logger.c +=================================================================== +--- memcached-1.6.12+dfsg.orig/logger.c ++++ memcached-1.6.12+dfsg/logger.c +@@ -269,7 +269,7 @@ + + static int _logger_parse_cne(logentry *e, char *scratch) { + int total; +- unsigned short rport; ++ unsigned short rport = 0; + char rip[64]; + struct logentry_conn_event *le = (struct logentry_conn_event *) e->data; + const char * const transport_map[] = { "local", "tcp", "udp" }; +@@ -286,7 +286,7 @@ + + static int _logger_parse_cce(logentry *e, char *scratch) { + int total; +- unsigned short rport; ++ unsigned short rport = 0; + char rip[64]; + struct logentry_conn_event *le = (struct logentry_conn_event *) e->data; + const char * const transport_map[] = { "local", "tcp", "udp" };

