From: Arnaldo Carvalho de Melo <acme@infradead.org>
To: Andi Kleen <ak@linux.intel.com>
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 15:13:37 -0300 [thread overview]
Message-ID: <20140318181337.GD6482@ghostprotocols.net> (raw)
In-Reply-To: <20140318150533.GA3132@tassilo.jf.intel.com>
Em Tue, Mar 18, 2014 at 08:05:33AM -0700, Andi Kleen escreveu:
> > Humm, this unconditionally replaces it with an alternative that limits
> > the buffer to a fixed size :-\
>
> Better than corrupting memory.
Yes, it is better than corrupting memory, use the less ugly, good point.
> 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
The return of snprintf is crazy, that is why we use scnprintf.
> 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.
Thanks for the data points,
- Arnaldo
prev parent reply other threads:[~2014-03-18 18:13 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
2014-03-18 18: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=20140318181337.GD6482@ghostprotocols.net \
--to=acme@infradead.org \
--cc=ak@linux.intel.com \
--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.