From: Jiri Olsa <jolsa@redhat.com>
To: Stephane Eranian <eranian@google.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
Namhyung Kim <namhyung@kernel.org>,
Arnaldo Carvalho de Melo <acme@redhat.com>,
Peter Zijlstra <peterz@infradead.org>,
"mingo@elte.hu" <mingo@elte.hu>, David Ahern <dsahern@gmail.com>
Subject: Re: [BUG] perf tools: off-by-one error in map_groups__find_ams()
Date: Thu, 2 Oct 2014 10:36:35 +0200 [thread overview]
Message-ID: <20141002083635.GF9764@krava.brq.redhat.com> (raw)
In-Reply-To: <CABPqkBQPjpgD_5n0ZMmx971+YO86CO+5mSfcg7a1p4Ys_TgOUA@mail.gmail.com>
On Wed, Oct 01, 2014 at 09:16:31PM +0200, Stephane Eranian wrote:
> Hi,
>
> It appears that there is a off-by-one bug in map_groups__find_ams().
> The upper-bound check in the test below should be >= because
> end = start + len; The end address is outside the range.
>
> Please confirm.
>
>
> int map_groups__find_ams(struct addr_map_symbol *ams, symbol_filter_t filter)
> {
> if (ams->addr < ams->map->start || ams->addr > ams->map->end) {
yep, looks like bug to me
jirka
next prev parent reply other threads:[~2014-10-02 8:37 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-01 19:16 [BUG] perf tools: off-by-one error in map_groups__find_ams() Stephane Eranian
2014-10-02 8:36 ` Jiri Olsa [this message]
2014-10-02 16:40 ` Stephane Eranian
2014-10-03 8:09 ` Jiri Olsa
2014-10-03 10:07 ` Stephane Eranian
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=20141002083635.GF9764@krava.brq.redhat.com \
--to=jolsa@redhat.com \
--cc=acme@redhat.com \
--cc=dsahern@gmail.com \
--cc=eranian@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.org \
/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