Re: [PATCH] Fix perf stat repeat segfault

2019-07-15 Thread Jiri Olsa
On Mon, Jul 15, 2019 at 01:14:59AM -0700, Stephane Eranian wrote: > On Mon, Jul 15, 2019 at 12:59 AM Jiri Olsa wrote: > > > > On Sun, Jul 14, 2019 at 02:36:42PM -0700, Stephane Eranian wrote: > > > On Sun, Jul 14, 2019 at 1:55 PM Jiri Olsa wrote: > > > > > > > > On Sun, Jul 14, 2019 at 10:44:36PM

Re: [PATCH] Fix perf stat repeat segfault

2019-07-15 Thread Stephane Eranian
On Mon, Jul 15, 2019 at 12:59 AM Jiri Olsa wrote: > > On Sun, Jul 14, 2019 at 02:36:42PM -0700, Stephane Eranian wrote: > > On Sun, Jul 14, 2019 at 1:55 PM Jiri Olsa wrote: > > > > > > On Sun, Jul 14, 2019 at 10:44:36PM +0200, Jiri Olsa wrote: > > > > On Wed, Jul 10, 2019 at 01:45:40PM -0700, Num

Re: [PATCH] Fix perf stat repeat segfault

2019-07-15 Thread Jiri Olsa
On Sun, Jul 14, 2019 at 02:36:42PM -0700, Stephane Eranian wrote: > On Sun, Jul 14, 2019 at 1:55 PM Jiri Olsa wrote: > > > > On Sun, Jul 14, 2019 at 10:44:36PM +0200, Jiri Olsa wrote: > > > On Wed, Jul 10, 2019 at 01:45:40PM -0700, Numfor Mbiziwo-Tiapo wrote: > > > > When perf stat is called with

Re: [PATCH] Fix perf stat repeat segfault

2019-07-14 Thread Stephane Eranian
On Sun, Jul 14, 2019 at 1:55 PM Jiri Olsa wrote: > > On Sun, Jul 14, 2019 at 10:44:36PM +0200, Jiri Olsa wrote: > > On Wed, Jul 10, 2019 at 01:45:40PM -0700, Numfor Mbiziwo-Tiapo wrote: > > > When perf stat is called with event groups and the repeat option, > > > a segfault occurs because the cpu

Re: [PATCH] Fix perf stat repeat segfault

2019-07-14 Thread Jiri Olsa
On Sun, Jul 14, 2019 at 10:44:36PM +0200, Jiri Olsa wrote: > On Wed, Jul 10, 2019 at 01:45:40PM -0700, Numfor Mbiziwo-Tiapo wrote: > > When perf stat is called with event groups and the repeat option, > > a segfault occurs because the cpu ids are stored on each iteration > > of the repeat, when the

Re: [PATCH] Fix perf stat repeat segfault

2019-07-14 Thread Jiri Olsa
On Wed, Jul 10, 2019 at 01:45:40PM -0700, Numfor Mbiziwo-Tiapo wrote: > When perf stat is called with event groups and the repeat option, > a segfault occurs because the cpu ids are stored on each iteration > of the repeat, when they should only be stored on the first iteration, > which causes a bu

[PATCH] Fix perf stat repeat segfault

2019-07-11 Thread Numfor Mbiziwo-Tiapo
When perf stat is called with event groups and the repeat option, a segfault occurs because the cpu ids are stored on each iteration of the repeat, when they should only be stored on the first iteration, which causes a buffer overflow. This can be replicated by running (from the tip directory): m

Re: [PATCH] Fix perf stat repeat segfault

2019-07-10 Thread Ravi Bangoria
Hi Numfor, On 7/11/19 2:15 AM, Numfor Mbiziwo-Tiapo wrote: > -static bool perf_evsel__should_store_id(struct perf_evsel *counter) > +static bool perf_evsel__should_store_id(struct perf_evsel *counter, int > run_idx) > { > - return STAT_RECORD || counter->attr.read_format & PERF_FORMAT_ID; >

[PATCH] Fix perf stat repeat segfault

2019-07-10 Thread Numfor Mbiziwo-Tiapo
When perf stat is called with event groups and the repeat option, a segfault occurs because the cpu ids are stored on each iteration of the repeat, when they should only be stored on the first iteration, which causes a buffer overflow. This can be replicated by running (from the tip directory): m