[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a9963f8b-6913-5f4d-214f-95fac5b80925@linux.ibm.com>
Date: Thu, 30 Sep 2021 15:33:34 +0530
From: kajoljain <kjain@...ux.ibm.com>
To: Jiri Olsa <jolsa@...hat.com>,
Arnaldo Carvalho de Melo <acme@...nel.org>
Cc: Mark Wielaard <mjw@...hat.com>,
Sukadev Bhattiprolu <sukadev@...ux.vnet.ibm.com>,
lkml <linux-kernel@...r.kernel.org>,
Peter Zijlstra <a.p.zijlstra@...llo.nl>,
Ingo Molnar <mingo@...nel.org>,
Mark Rutland <mark.rutland@....com>,
Namhyung Kim <namhyung@...nel.org>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Michael Petlan <mpetlan@...hat.com>,
Ian Rogers <irogers@...gle.com>,
linux-perf-users@...r.kernel.org
Subject: Re: [PATCH] perf tools: Fix compilation on powerpc
On 9/29/21 1:22 AM, Jiri Olsa wrote:
> Got following build fail on powerpc:
>
> CC arch/powerpc/util/skip-callchain-idx.o
> In function ‘check_return_reg’,
> inlined from ‘check_return_addr’ at arch/powerpc/util/skip-callchain-idx.c:213:7,
> inlined from ‘arch_skip_callchain_idx’ at arch/powerpc/util/skip-callchain-idx.c:265:7:
> arch/powerpc/util/skip-callchain-idx.c:54:18: error: ‘dwarf_frame_register’ accessing 96 bytes \
> in a region of size 64 [-Werror=stringop-overflow=]
> 54 | result = dwarf_frame_register(frame, ra_regno, ops_mem, &ops, &nops);
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> arch/powerpc/util/skip-callchain-idx.c: In function ‘arch_skip_callchain_idx’:
> arch/powerpc/util/skip-callchain-idx.c:54:18: note: referencing argument 3 of type ‘Dwarf_Op *’
> In file included from /usr/include/elfutils/libdwfl.h:32,
> from arch/powerpc/util/skip-callchain-idx.c:10:
> /usr/include/elfutils/libdw.h:1069:12: note: in a call to function ‘dwarf_frame_register’
> 1069 | extern int dwarf_frame_register (Dwarf_Frame *frame, int regno,
> | ^~~~~~~~~~~~~~~~~~~~
> cc1: all warnings being treated as errors
>
> The dwarf_frame_register args changed with [1],
> Updating ops_mem accordingly.
>
> [1] https://sourceware.org/git/?p=elfutils.git;a=commit;h=5621fe5443da23112170235dd5cac161e5c75e65
Hi Jiri,
Thanks for the patch. I was able to reproduce this issue with gcc11 and
verified that with your change we no longer seeing this error.
Reviewed-by: Kajol Jain<kjain@...ux.ibm.com>
Tested-by: Kajol Jain<kjain@...uxibm.com>
Thanks,
Kajol Jain
>
> Cc: Mark Wielaard <mjw@...hat.com>
> Cc: Sukadev Bhattiprolu <sukadev@...ux.vnet.ibm.com>
> Signed-off-by: Jiri Olsa <jolsa@...hat.com>
> ---
> tools/perf/arch/powerpc/util/skip-callchain-idx.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/perf/arch/powerpc/util/skip-callchain-idx.c b/tools/perf/arch/powerpc/util/skip-callchain-idx.c
> index 3018a054526a..20cd6244863b 100644
> --- a/tools/perf/arch/powerpc/util/skip-callchain-idx.c
> +++ b/tools/perf/arch/powerpc/util/skip-callchain-idx.c
> @@ -45,7 +45,7 @@ static const Dwfl_Callbacks offline_callbacks = {
> */
> static int check_return_reg(int ra_regno, Dwarf_Frame *frame)
> {
> - Dwarf_Op ops_mem[2];
> + Dwarf_Op ops_mem[3];
> Dwarf_Op dummy;
> Dwarf_Op *ops = &dummy;
> size_t nops;
>
Powered by blists - more mailing lists