lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <tip-zyvsjvbl45o7hzcuz78wu2xi@git.kernel.org>
Date:	Wed, 13 Jul 2016 00:21:52 -0700
From:	tip-bot for Arnaldo Carvalho de Melo <tipbot@...or.com>
To:	linux-tip-commits@...r.kernel.org
Cc:	linux-kernel@...r.kernel.org, hpa@...or.com, wangnan0@...wei.com,
	namhyung@...nel.org, dsahern@...il.com, acme@...hat.com,
	mingo@...nel.org, tglx@...utronix.de, adrian.hunter@...el.com,
	jolsa@...nel.org
Subject: [tip:perf/core] perf script python: Silence
 -Werror=maybe-uninitialized on gcc 5.3.0

Commit-ID:  39f54862a935e14a448cbd68d6a6bef68d026dbe
Gitweb:     http://git.kernel.org/tip/39f54862a935e14a448cbd68d6a6bef68d026dbe
Author:     Arnaldo Carvalho de Melo <acme@...hat.com>
AuthorDate: Tue, 12 Jul 2016 11:05:26 -0300
Committer:  Arnaldo Carvalho de Melo <acme@...hat.com>
CommitDate: Tue, 12 Jul 2016 15:20:39 -0300

perf script python: Silence -Werror=maybe-uninitialized on gcc 5.3.0

Sounds like a compiler bug, but to silence it, initialize those
variables to NULL.

Noticed on:

Target: x86_64-alpine-linux-musl
Configured with: /home/buildozer/aports/main/gcc/src/gcc-5.3.0/configure
--prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info
--build=x86_64-alpine-linux-musl --host=x86_64-alpine-linux-musl
--target=x86_64-alpine-linux-musl --with-pkgversion='Alpine 5.3.0'
--enable-checking=release --disable-fixed-point --disable-libstdcxx-pch
--disable-multilib --disable-nls --disable-werror --disable-symvers
--enable-__cxa_atexit --enable-esp --enable-cloog-backend
--enable-languages=c,c++,objc,java,fortran,ada --disable-libssp
--disable-libmudflap --disable-libsanitizer --enable-shared
--enable-threads --enable-tls --with-system-zlib
Thread model: posix
gcc version 5.3.0 (Alpine 5.3.0)

Cc: Adrian Hunter <adrian.hunter@...el.com>
Cc: David Ahern <dsahern@...il.com>
Cc: Jiri Olsa <jolsa@...nel.org>
Cc: Namhyung Kim <namhyung@...nel.org>
Cc: Wang Nan <wangnan0@...wei.com>
Link: http://lkml.kernel.org/n/tip-zyvsjvbl45o7hzcuz78wu2xi@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com>
---
 tools/perf/util/scripting-engines/trace-event-python.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/perf/util/scripting-engines/trace-event-python.c b/tools/perf/util/scripting-engines/trace-event-python.c
index ff13470..6ac6b7a 100644
--- a/tools/perf/util/scripting-engines/trace-event-python.c
+++ b/tools/perf/util/scripting-engines/trace-event-python.c
@@ -273,7 +273,7 @@ static PyObject *get_field_numeric_entry(struct event_format *event,
 		struct format_field *field, void *data)
 {
 	bool is_array = field->flags & FIELD_IS_ARRAY;
-	PyObject *obj, *list = NULL;
+	PyObject *obj = NULL, *list = NULL;
 	unsigned long long val;
 	unsigned int item_size, n_items, i;
 
@@ -392,7 +392,7 @@ static void python_process_tracepoint(struct perf_sample *sample,
 				      struct addr_location *al)
 {
 	struct event_format *event = evsel->tp_format;
-	PyObject *handler, *context, *t, *obj, *callchain;
+	PyObject *handler, *context, *t, *obj = NULL, *callchain;
 	PyObject *dict = NULL;
 	static char handler_name[256];
 	struct format_field *field;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ