summaryrefslogtreecommitdiff
path: root/tools/include
diff options
context:
space:
mode:
authorSuchit Karunakaran <suchitkarunakaran@gmail.com>2026-01-22 22:47:04 +0530
committerArnaldo Carvalho de Melo <acme@redhat.com>2026-01-23 16:58:39 -0300
commitf0d98c78f8bf73ce2a9b7793f66cda240fa9ab10 (patch)
tree8e0a4c6ca2d0dbaa6a7ac00d82e786df582c421a /tools/include
parentc5e47e4d00fbc15f2390bb6ed8d9c21836363291 (diff)
perf annotate: Fix memcpy size in arch__grow_instructions()
The memcpy() in arch__grow_instructions() is copying the wrong number of bytes when growing from a non-allocated table. It should copy arch->nr_instructions * sizeof(struct ins) bytes, not just arch->nr_instructions bytes. This bug causes data corruption as only a partial copy of the instruction table is made, leading to garbage data in most entries and potential crashes Fixes: 2a1ff812c40be982 ("perf annotate: Introduce alternative method of keeping instructions table") Reviewed-by: Ian Rogers <irogers@google.com> Signed-off-by: Suchit Karunakaran <suchitkarunakaran@gmail.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: James Clark <james.clark@linaro.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/include')
0 files changed, 0 insertions, 0 deletions