[patch 36-rc5] perf browser ui segfault on 'a' for annotate

From: Frederik Deweerdt
Date: Thu Sep 23 2010 - 16:16:15 EST


Hi Arnaldo,

There a typo in util/ui/browsers/hists.c that leads to a segfault when
you press the 'a' key on a non-resolved symbol (plain hex address).

This is fixed by the patch below.

Thanks,
Frederik

Signed-off-by: Frederik Deweerdt <frederik.deweerdt@xxxxxxxx>

diff --git a/tools/perf/util/ui/browsers/hists.c b/tools/perf/util/ui/browsers/hists.c
index dafdf67..6866aa4 100644
--- a/tools/perf/util/ui/browsers/hists.c
+++ b/tools/perf/util/ui/browsers/hists.c
@@ -773,7 +773,7 @@ int hists__browse(struct hists *self, const char *helpline, const char *ev_name)

switch (key) {
case 'a':
- if (browser->selection->map == NULL &&
+ if (browser->selection->map == NULL ||
browser->selection->map->dso->annotate_warned)
continue;
goto do_annotate;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/