On Mon, Mar 11, 2019 at 01:24:38PM -0700, Andi Kleen wrote: > From: Andi Kleen <a...@linux.intel.com> > > When -r is used memory would get corrupted because the evsel->id array > would get overrun. evsel->ids is a running counter of the last id. > Normally this works fine, but with -r the same event is initialized > multiple times, but not this counter, so it would keep growing > beyond the array limit and corrupt random memory. > > Always reinitialize ->ids, and also add an assert to catch > such overruns in the future. > > This fixes a perf segfault when running it from toplev.
This one should be Cc: stable -Andi