Re: [PATCH 1/3] perf, evlist: Fix access of freed id arrays

2019-09-24 Thread Andi Kleen
> id/sample_id arrays are not created when evsel is open but > we free it at close > > for now this fix seems correct to me.. we are moving id/sample_id > arrays under libperf, I'll make a note to check on close and reopen > of evsel and add some tests for that > > Acked-by: Jiri Olsa It looks

Re: [PATCH 1/3] perf, evlist: Fix access of freed id arrays

2019-09-24 Thread Jiri Olsa
On Mon, Sep 23, 2019 at 04:33:37PM -0700, Andi Kleen wrote: > From: Andi Kleen > > I'm not fully sure if this is the correct fix, but without this > I get crashes on more complex perf stat metric usages. The problem > is that part of the state gets freed when a weak group fails, > but then is lat

[PATCH 1/3] perf, evlist: Fix access of freed id arrays

2019-09-23 Thread Andi Kleen
From: Andi Kleen I'm not fully sure if this is the correct fix, but without this I get crashes on more complex perf stat metric usages. The problem is that part of the state gets freed when a weak group fails, but then is later still used. Just don't free the ids, we're going to reuse them anyway