public inbox for linux-perf-users@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] perf disasm: Fix off-by-one bug in outside check
@ 2026-03-04 19:06 Peter Collingbourne
  2026-03-04 19:49 ` Ian Rogers
  2026-03-06 18:53 ` [PATCH v1] perf annotate loongarch: " Ian Rogers
  0 siblings, 2 replies; 6+ messages in thread
From: Peter Collingbourne @ 2026-03-04 19:06 UTC (permalink / raw)
  To: Ian Rogers
  Cc: Peter Collingbourne, Peter Zijlstra, Ingo Molnar,
	Arnaldo Carvalho de Melo, Namhyung Kim, Mark Rutland,
	Alexander Shishkin, Jiri Olsa, Adrian Hunter, James Clark,
	Nathan Chancellor, Nick Desaulniers, Bill Wendling, Justin Stitt,
	linux-perf-users, linux-kernel, llvm

If a branch target points to one past the end of a function, the branch
should be treated as a branch to another function. This can happen
e.g. with a tail call to a function that is laid out immediately after
the caller.

Link: https://linux-review.googlesource.com/id/Ide471112e82d68177e0faf08ca411d9fcf0a7bdf
Signed-off-by: Peter Collingbourne <pcc@google.com>
---
 tools/perf/util/disasm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/util/disasm.c b/tools/perf/util/disasm.c
index ddcc488f2e5f0..9e0420e14be19 100644
--- a/tools/perf/util/disasm.c
+++ b/tools/perf/util/disasm.c
@@ -384,7 +384,7 @@ static int jump__parse(const struct arch *arch, struct ins_operands *ops, struct
 	start = map__unmap_ip(map, sym->start);
 	end = map__unmap_ip(map, sym->end);
 
-	ops->target.outside = target.addr < start || target.addr > end;
+	ops->target.outside = target.addr < start || target.addr >= end;
 
 	/*
 	 * FIXME: things like this in _cpp_lex_token (gcc's cc1 program):
-- 
2.53.0.473.g4a7958ca14-goog


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-03-10 15:09 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-04 19:06 [PATCH] perf disasm: Fix off-by-one bug in outside check Peter Collingbourne
2026-03-04 19:49 ` Ian Rogers
2026-03-04 20:30   ` Arnaldo Carvalho de Melo
2026-03-06 18:53 ` [PATCH v1] perf annotate loongarch: " Ian Rogers
2026-03-10 15:07   ` Arnaldo Carvalho de Melo
2026-03-10 15:09   ` 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