[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20140318181337.GD6482@ghostprotocols.net>
Date: Tue, 18 Mar 2014 15:13:37 -0300
From: Arnaldo Carvalho de Melo <acme@...radead.org>
To: Andi Kleen <ak@...ux.intel.com>
Cc: Andi Kleen <andi@...stfloor.org>, mingo@...nel.org,
linux-kernel@...r.kernel.org, peterz@...radead.org,
eranian@...gle.com, namhyung@...nel.org, jolsa@...hat.com
Subject: Re: [PATCH] tools, perf: Add asprintf replacement
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists