Skip to content

Commit c7c92f7

Browse files
captain5050acmel
authored andcommitted
perf annotate loongarch: Fix off-by-one bug in outside check
A copy-paste of a similar issue fixed by Peter Collingbourne in: https://lore.kernel.org/linux-perf-users/20260304190613.2507582-1-pcc@google.com/ Signed-off-by: Ian Rogers <irogers@google.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Bill Wendling <morbo@google.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: James Clark <james.clark@linaro.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Justin Stitt <justinstitt@google.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Nathan Chancellor <nathan@kernel.org> Cc: Nick Desaulniers <nick.desaulniers+lkml@gmail.com> Cc: Peter Collingbourne <pcc@google.com> Cc: Peter Zijlstra <peterz@infradead.org> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
1 parent be34705 commit c7c92f7

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

tools/perf/util/annotate-arch/annotate-loongarch.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ static int loongarch_jump__parse(const struct arch *arch, struct ins_operands *o
9393
start = map__unmap_ip(map, sym->start);
9494
end = map__unmap_ip(map, sym->end);
9595

96-
ops->target.outside = target.addr < start || target.addr > end;
96+
ops->target.outside = target.addr < start || target.addr >= end;
9797

9898
if (maps__find_ams(thread__maps(ms->thread), &target) == 0 &&
9999
map__rip_2objdump(target.ms.map, map__map_ip(target.ms.map, target.addr)) == ops->target.addr)

0 commit comments

Comments
 (0)