diff --git a/[refs] b/[refs] index 8624b850a115..a217074ee730 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 5c35d69fb60b1dc49595f5b9a2c7158283e9eaf3 +refs/heads/master: 289c082044643e55f65c6a16bb3621cf3f35a454 diff --git a/trunk/tools/perf/util/annotate.c b/trunk/tools/perf/util/annotate.c index 02976b895f27..70ec422ddb64 100644 --- a/trunk/tools/perf/util/annotate.c +++ b/trunk/tools/perf/util/annotate.c @@ -541,11 +541,12 @@ void symbol__annotate_decay_histogram(struct symbol *sym, int evidx) struct annotation *notes = symbol__annotation(sym); struct sym_hist *h = annotation__histogram(notes, evidx); struct objdump_line *pos; + int len = sym->end - sym->start; h->sum = 0; list_for_each_entry(pos, ¬es->src->source, node) { - if (pos->offset != -1) { + if (pos->offset != -1 && pos->offset < len) { h->addr[pos->offset] = h->addr[pos->offset] * 7 / 8; h->sum += h->addr[pos->offset]; }