From: Jiri Olsa <jolsa@redhat.com>
To: Hagen Paul Pfeifer <hagen@jauu.net>
Cc: linux-kernel@vger.kernel.org, Jiri Olsa <jolsa@kernel.org>,
Arnaldo Carvalho de Melo <acme@redhat.com>
Subject: Re: perf script, libperf: python binding bug (bytearrays vs. strings)
Date: Mon, 28 Sep 2020 15:39:42 +0200 [thread overview]
Message-ID: <20200928133942.GC3517742@krava> (raw)
In-Reply-To: <20200928104311.GA412466@laniakea>
On Mon, Sep 28, 2020 at 12:43:11PM +0200, Hagen Paul Pfeifer wrote:
> * Jiri Olsa | 2020-09-28 12:08:08 [+0200]:
>
> >patch below fixes it for me, but seems strange this was
> >working till now.. maybe you're the only one using this
> >with python3 ;-)
>
> and I thought python2 is obsolete and not maintained anymore ... ;-)
> Anyway, the patch fixed everything: no more garbage for Python2 and Python3
> as well as no bytearray type Python3!
>
> Tested-by: Hagen Paul Pfeifer <hagen@jauu.net>
>
> Thank you Jiri!
>
> Probably this patch should be applied on stable too!? Not sure when the
> problem was introduced.
great, I'll check on that and send full patch later, thanks
jirka
>
> Hagen
>
> >jirka
> >
> >
> >---
> >diff --git a/tools/perf/util/print_binary.c b/tools/perf/util/print_binary.c
> >index 599a1543871d..13fdc51c61d9 100644
> >--- a/tools/perf/util/print_binary.c
> >+++ b/tools/perf/util/print_binary.c
> >@@ -50,7 +50,7 @@ int is_printable_array(char *p, unsigned int len)
> >
> > len--;
> >
> >- for (i = 0; i < len; i++) {
> >+ for (i = 0; i < len && p[i]; i++) {
> > if (!isprint(p[i]) && !isspace(p[i]))
> > return 0;
> > }
> >
>
next prev parent reply other threads:[~2020-09-28 13:40 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-27 7:43 perf script, libperf: python binding bug (bytearrays vs. strings) Hagen Paul Pfeifer
2020-09-27 9:20 ` Hagen Paul Pfeifer
2020-09-28 10:08 ` Jiri Olsa
2020-09-28 10:43 ` Hagen Paul Pfeifer
2020-09-28 13:39 ` Jiri Olsa [this message]
2020-09-28 19:19 ` Arnaldo Carvalho de Melo
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=20200928133942.GC3517742@krava \
--to=jolsa@redhat.com \
--cc=acme@redhat.com \
--cc=hagen@jauu.net \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).