diff options
| author | Arnaldo Carvalho de Melo <[email protected]> | 2017-08-17 17:22:50 +0000 |
|---|---|---|
| committer | Arnaldo Carvalho de Melo <[email protected]> | 2017-08-17 19:39:15 +0000 |
| commit | d17d0878f456c8227345b6c76b918ec068fa0abd (patch) | |
| tree | 99ac28dae00148f660b53d163a3b8ad9083fb3a3 /tools/perf/util/annotate.c | |
| parent | perf events parse: Rename parsing state struct to clearer name (diff) | |
| download | kernel-d17d0878f456c8227345b6c76b918ec068fa0abd.tar.gz kernel-d17d0878f456c8227345b6c76b918ec068fa0abd.zip | |
perf events parse: Use just one parse events state struct
Andi reported problems when parse errors were detected with vendor
events (json), because in the yyparse/parse_events_parse function we
dereferenced the _data parameter to two different structs, with
different layouts, which ended up making parse_events_evlist->error to
point to random stack addresses.
Fix it by making _data to always be struct parse_events_state, changing
the only place where 'struct parse_events_term' was used in
parse_events.y.
Reported-by: Andi Kleen <[email protected]>
Cc: Adrian Hunter <[email protected]>
Cc: David Ahern <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Wang Nan <[email protected]>
Link: http://lkml.kernel.org/n/[email protected]
Fixes: 90e2b22dee90 ("perf/tool: Add support to reuse event grammar to parse out terms")
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Diffstat (limited to 'tools/perf/util/annotate.c')
0 files changed, 0 insertions, 0 deletions
