From: Andi Kleen <ak@linux.intel.com>
To: Arnaldo Carvalho de Melo <acme@infradead.org>
Cc: Andi Kleen <andi@firstfloor.org>,
mingo@kernel.org, linux-kernel@vger.kernel.org,
peterz@infradead.org, eranian@google.com, namhyung@kernel.org,
jolsa@redhat.com
Subject: Re: [PATCH] tools, perf: Add asprintf replacement
Date: Tue, 18 Mar 2014 08:05:33 -0700 [thread overview]
Message-ID: <20140318150533.GA3132@tassilo.jf.intel.com> (raw)
In-Reply-To: <20140318142632.GB6482@ghostprotocols.net>
> Humm, this unconditionally replaces it with an alternative that limits
> the buffer to a fixed size :-\
Better than corrupting memory.
I guess you could use two passes to avoid the limit, but it would surprise me
if anything in perf needs more than 1K of printf. One issue
with doing two passes is that I wasn't sure the snprintf return
value would work properly on all libcs (e.g. the weirdo one Android uses)
>
> Do you recall at least one of those old glibc version/release number?
glibc-2.13-2.x86_64 (FC14)
>
> A reproducer? So that I can try to reproduce it here and try to polish
> this a bit more...
I saw it with perf report --branch-history in TUI mode and then pressing
e. But even running valgrind in stdio mode showed some corruption.
Without the patch also using some of the --call-graph options segfaulted.
-Andi
next prev parent reply other threads:[~2014-03-18 15:11 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-11 6:43 [PATCH] tools, perf: Add asprintf replacement Andi Kleen
2014-03-18 14:26 ` Arnaldo Carvalho de Melo
2014-03-18 15:05 ` Andi Kleen [this message]
2014-03-18 18:13 ` 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=20140318150533.GA3132@tassilo.jf.intel.com \
--to=ak@linux.intel.com \
--cc=acme@infradead.org \
--cc=andi@firstfloor.org \
--cc=eranian@google.com \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.