Re: [PATCH] tools, perf: Add asprintf replacement

2014-03-18 Thread Arnaldo Carvalho de Melo
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

Re: [PATCH] tools, perf: Add asprintf replacement

2014-03-18 Thread Andi Kleen
> 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

Re: [PATCH] tools, perf: Add asprintf replacement

2014-03-18 Thread Arnaldo Carvalho de Melo
Em Mon, Mar 10, 2014 at 11:43:24PM -0700, Andi Kleen escreveu: > From: Andi Kleen > > asprintf corrupts memory on some older glibc versions. > Provide a replacement. This fixes various segfaults > with --branch-history on older Fedoras. Humm, this unconditionally replaces it with an alternative

[PATCH] tools, perf: Add asprintf replacement

2014-03-10 Thread Andi Kleen
From: Andi Kleen asprintf corrupts memory on some older glibc versions. Provide a replacement. This fixes various segfaults with --branch-history on older Fedoras. Signed-off-by: Andi Kleen --- tools/perf/Makefile.perf | 1 + tools/perf/util/asprintf.c | 28 2 f