Re: [PATCH 2/2] perf stat: Fix segfault when -r option is used

2021-02-24 Thread Namhyung Kim
On Wed, Feb 24, 2021 at 5:11 PM Namhyung Kim wrote: > > I got a segfault when using -r option with event groups. The option > makes it run the workload multiple times and it will reuse the evlist > and evsel for each run. Well, it might not see a segfault because the freed memory region is likel

[PATCH 2/2] perf stat: Fix segfault when -r option is used

2021-02-24 Thread Namhyung Kim
I got a segfault when using -r option with event groups. The option makes it run the workload multiple times and it will reuse the evlist and evsel for each run. While most of resources are allocated and freed properly, the id hash in the evlist was not and it resulted in a crash. You can see it