Re: [BUG] perf stat: corrupts memory when using PMU cpumask

2014-01-17 Thread Stephane Eranian
Arnaldo, I just sent the patches I wrote to fix the bugs I ran into since yesterday. On Fri, Jan 17, 2014 at 3:09 PM, Arnaldo Carvalho de Melo wrote: > Em Fri, Jan 17, 2014 at 10:00:20AM +0100, Stephane Eranian escreveu: >> The issue boils down to the fact that evsels have their file descriptor

Re: [BUG] perf stat: corrupts memory when using PMU cpumask

2014-01-17 Thread Arnaldo Carvalho de Melo
Em Fri, Jan 17, 2014 at 10:00:20AM +0100, Stephane Eranian escreveu: > The issue boils down to the fact that evsels have their file descriptors > closed > twice nowadays. Once in __run_per_stat() via perf_evsel__close_fd() and > twice in perf_evlist__close(). > Now, calling close() twice is okay

Re: [BUG] perf stat: corrupts memory when using PMU cpumask

2014-01-17 Thread Arnaldo Carvalho de Melo
Em Fri, Jan 17, 2014 at 10:00:20AM +0100, Stephane Eranian escreveu: > Hi, > > I have been debugging a NULL pointer issue with perf stat unit/scale code > and in the process I ran into what appeared like a double-free issue reported > by glibc. It took me a while to realize that it was because of

[BUG] perf stat: corrupts memory when using PMU cpumask

2014-01-17 Thread Stephane Eranian
Hi, I have been debugging a NULL pointer issue with perf stat unit/scale code and in the process I ran into what appeared like a double-free issue reported by glibc. It took me a while to realize that it was because of memory corruption caused by a recent change in how evsel are freed. My test ca