linux/tools
Namhyung Kim 26353a61b9 perf hists: Fix an invalid memory free on he->branch_info
The branch info was allocated for the whole stack and passed matching
hist entry for each level during processing samples.  Thus when a hist
entry tries to free its branch info like in hists__collapse_insert_entry
it'll face following error.

  *** glibc detected *** perf: munmap_chunk(): invalid pointer: 0x00000000014e9d20 ***
  ======= Backtrace: =========
  /lib64/libc.so.6[0x387d47ae16]
  perf[0x4923bd]
  perf(cmd_report+0xd68)[0x432a08]
  perf[0x41a663]
  perf(main+0x58f)[0x419eaf]
  /lib64/libc.so.6(__libc_start_main+0xf5)[0x387d421735]
  perf[0x419f95]

Fix it by allocating and copying branch info for each new hist entry.

Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/r/1364816125-12212-2-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2013-05-28 16:23:52 +03:00
..
cgroup cgroups: fix cgroup_event_listener error handling 2013-01-08 10:00:44 -08:00
firewire tools/firewire: nosy-dump: check for allocation failure 2012-12-02 20:10:18 +01:00
hv Tools: hv: Fix a checkpatch warning 2013-04-24 09:02:36 -07:00
include/tools tools/include: Add byteshift headers for endian access 2012-02-28 10:22:51 -08:00
lguest lguest: fix paths in comments 2013-03-07 09:56:46 +11:00
lib tools lib lk: Fix _FORTIFY_SOURCE builds 2013-03-15 13:06:01 -03:00
net filter: add minimal BPF JIT image disassembler 2013-03-21 11:35:41 -04:00
nfsd
perf perf hists: Fix an invalid memory free on he->branch_info 2013-05-28 16:23:52 +03:00
power Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux 2013-05-11 15:23:17 -07:00
scripts perf tools: Correct Makefile.include 2013-03-15 13:05:59 -03:00
testing revert "selftest: add simple test for soft-dirty bit" 2013-05-24 16:22:52 -07:00
usb tools: usb: ffs-test: Fix build failure 2013-03-07 12:23:17 +08:00
virtio tools/virtio: remove virtqueue_add_buf() from tests. 2013-03-20 15:45:07 +10:30
vm tools/vm: Switch to liblk library 2013-03-15 13:06:01 -03:00
Makefile Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2013-05-01 14:08:52 -07:00