lkml.org 
[lkml]   [2019]   [Jul]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] perf stat: Fix segfault for event group in repeat mode
Em Mon, Jul 15, 2019 at 04:21:21PM +0200, Jiri Olsa escreveu:
> Numfor Mbiziwo-Tiapo reported segfault on stat of event
> group in repeat mode:
>
> # perf stat -e '{cycles,instructions}' -r 10 ls
>
> It's caused by memory corruption due to not cleaned
> evsel's id array and index, which needs to be rebuilt
> in every stat iteration. Currently the ids index grows,
> while the array (which is also not freed) has the same
> size.
>
> Fixing this by releasing id array and zeroing ids index
> in perf_evsel__close function.
>
> We also need to keep the evsel_list alive for stat
> record (which is disabled in repeat mode).

Thanks, applied.

- Arnaldo

\
 
 \ /
  Last update: 2019-07-16 20:48    [W:0.068 / U:0.460 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site