Re: [PATCH] perf tools: Fix crash in build_id_cache__kallsyms_path()

2016-06-10 Thread Masami Hiramatsu
On Tue, 7 Jun 2016 03:54:38 + Wang Nan wrote: > build_id_cache__kallsyms_path() accept string buffer but also alloc buffer > by itself using asnprintf. Unfortunately, the only user of it passes it > a stack-allocated buffer. Freeing it causes crash like this: > > $ perf script > *** Error

[PATCH] perf tools: Fix crash in build_id_cache__kallsyms_path()

2016-06-06 Thread Wang Nan
build_id_cache__kallsyms_path() accept string buffer but also alloc buffer by itself using asnprintf. Unfortunately, the only user of it passes it a stack-allocated buffer. Freeing it causes crash like this: $ perf script *** Error in `/home/wangnan/perf': free(): invalid pointer: 0x7fff