* [tip:perf/urgent] perf evlist: Explicititely initialize input_name
@ 2012-05-24 10:37 tip-bot for Arnaldo Carvalho de Melo
0 siblings, 0 replies; only message in thread
From: tip-bot for Arnaldo Carvalho de Melo @ 2012-05-24 10:37 UTC (permalink / raw)
To: linux-tip-commits
Cc: linux-kernel, eranian, paulus, acme, hpa, mingo, peterz, efault,
namhyung, fweisbec, dsahern, tglx
Commit-ID: a1d44b9acdf7b2820ef762846150b4d13b84e075
Gitweb: http://git.kernel.org/tip/a1d44b9acdf7b2820ef762846150b4d13b84e075
Author: Arnaldo Carvalho de Melo <acme@redhat.com>
AuthorDate: Wed, 23 May 2012 21:47:51 -0300
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Wed, 23 May 2012 21:47:51 -0300
perf evlist: Explicititely initialize input_name
It was a global variable, so it was initialized, implicitely, to zero by
being placed in the bss.
Now it is just a local variable that is then passed to the __cmd_evlist
routine, so it must be explicitely set to NULL.
The problem manifested on a Fedora 17 system, using:
gcc version 4.7.0 20120507 (Red Hat 4.7.0-5) (GCC)
But not on several other systems, by luck.
Reported-by: Ingo Molnar <mingo@kernel.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Namhyung Kim <namhyung@gmail.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-5e8wolcjs3rgd5i6yi995gfh@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/builtin-evlist.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/tools/perf/builtin-evlist.c b/tools/perf/builtin-evlist.c
index e52d77e..acd78dc 100644
--- a/tools/perf/builtin-evlist.c
+++ b/tools/perf/builtin-evlist.c
@@ -116,7 +116,7 @@ static const char * const evlist_usage[] = {
int cmd_evlist(int argc, const char **argv, const char *prefix __used)
{
struct perf_attr_details details = { .verbose = false, };
- const char *input_name;
+ const char *input_name = NULL;
const struct option options[] = {
OPT_STRING('i', "input", &input_name, "file",
"Input file name"),
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2012-05-24 10:38 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-24 10:37 [tip:perf/urgent] perf evlist: Explicititely initialize input_name tip-bot for Arnaldo Carvalho de Melo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox