From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Jiri Olsa <jolsa@redhat.com>
Cc: Song Liu <songliubraving@fb.com>,
linux-kernel@vger.kernel.org, stable <stable@vger.kernel.org>,
Jin Yao <yao.jin@linux.intel.com>, Jiri Olsa <jolsa@kernel.org>,
Arnaldo Carvalho de Melo <acme@redhat.com>
Subject: Re: [PATCH] perf: increase size of buf in perf_evsel__hists_browse()
Date: Tue, 3 Nov 2020 09:13:28 -0300 [thread overview]
Message-ID: <20201103121328.GC151027@kernel.org> (raw)
In-Reply-To: <20201031202920.GC3380099@krava>
Em Sat, Oct 31, 2020 at 09:29:20PM +0100, Jiri Olsa escreveu:
> On Fri, Oct 30, 2020 at 04:54:31PM -0700, Song Liu wrote:
> > Making perf with gcc-9.1.1 generates the following warning:
> >
> > CC ui/browsers/hists.o
> > ui/browsers/hists.c: In function 'perf_evsel__hists_browse':
> > ui/browsers/hists.c:3078:61: error: '%d' directive output may be \
> > truncated writing between 1 and 11 bytes into a region of size \
> > between 2 and 12 [-Werror=format-truncation=]
> >
> > 3078 | "Max event group index to sort is %d (index from 0 to %d)",
> > | ^~
> > ui/browsers/hists.c:3078:7: note: directive argument in the range [-2147483648, 8]
> > 3078 | "Max event group index to sort is %d (index from 0 to %d)",
> > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > In file included from /usr/include/stdio.h:937,
> > from ui/browsers/hists.c:5:
> >
> > IOW, the string in line 3078 might be too long for buf[] of 64 bytes.
> >
> > Fix this by increasing the size of buf[] to 128.
> >
> > Fixes: dbddf1747441 ("perf report/top TUI: Support hotkeys to let user select any event for sorting")
> > Cc: stable <stable@vger.kernel.org> # v5.7+
> > Cc: Jin Yao <yao.jin@linux.intel.com>
> > Cc: Jiri Olsa <jolsa@kernel.org>
> > Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
> > Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
> > Signed-off-by: Song Liu <songliubraving@fb.com>
>
> Acked-by: Jiri Olsa <jolsa@kernel.org>
Thanks, applied.
- Arnaldo
prev parent reply other threads:[~2020-11-03 12:13 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-30 23:54 [PATCH] perf: increase size of buf in perf_evsel__hists_browse() Song Liu
2020-10-31 11:27 ` David Laight
2020-11-01 18:06 ` Song Liu
2020-10-31 20:29 ` Jiri Olsa
2020-11-03 12:13 ` Arnaldo Carvalho de Melo [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201103121328.GC151027@kernel.org \
--to=acme@kernel.org \
--cc=acme@redhat.com \
--cc=jolsa@kernel.org \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=songliubraving@fb.com \
--cc=stable@vger.kernel.org \
--cc=yao.jin@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).