linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* perf command line error handling regression
@ 2023-07-13 16:42 Andi Kleen
  2023-07-13 21:29 ` Ian Rogers
  0 siblings, 1 reply; 2+ messages in thread
From: Andi Kleen @ 2023-07-13 16:42 UTC (permalink / raw)
  To: irogers; +Cc: linux-perf-users

Ian,

Since the commit below, I see the following:

$ perf foo
Segmentation fault (core dumped)
$

Before:

$ perf foo
perf: 'foo' is not a perf-command. See 'perf --help'.
$

(gdb) bt
#0  0x00007ffff6f89fe2 in __strcmp_evex () from /lib64/libc.so.6
#1  0x00007ffff6e6387d in msort_with_tmp.part () from /lib64/libc.so.6
#2  0x00007ffff6e63bd6 in qsort_r () from /lib64/libc.so.6
#3  0x00000000005895af in help_unknown_cmd (cmd=cmd@entry=0x7fffffffdaf2 "foo") at util/help-unknown-cmd.c:71
#4  0x000000000040cb52 in main (argc=1, argv=0x7fffffffd750) at perf.c:543


commit 657a3efee43a29d13c4f30e4c8f6a178fd2bf14a
Author: Ian Rogers <irogers@google.com>
Date:   Sun Jun 11 16:36:06 2023 -0700

    lib subcmd: Avoid memory leak in exclude_cmds

    exclude_cmds will shorten the cmds names array, before doing so free the
    removed entry.


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: perf command line error handling regression
  2023-07-13 16:42 perf command line error handling regression Andi Kleen
@ 2023-07-13 21:29 ` Ian Rogers
  0 siblings, 0 replies; 2+ messages in thread
From: Ian Rogers @ 2023-07-13 21:29 UTC (permalink / raw)
  To: Andi Kleen, Anup Sharma; +Cc: linux-perf-users

On Thu, Jul 13, 2023 at 9:42 AM Andi Kleen <ak@linux.intel.com> wrote:
>
> Ian,
>
> Since the commit below, I see the following:
>
> $ perf foo
> Segmentation fault (core dumped)
> $
>
> Before:
>
> $ perf foo
> perf: 'foo' is not a perf-command. See 'perf --help'.
> $
>
> (gdb) bt
> #0  0x00007ffff6f89fe2 in __strcmp_evex () from /lib64/libc.so.6
> #1  0x00007ffff6e6387d in msort_with_tmp.part () from /lib64/libc.so.6
> #2  0x00007ffff6e63bd6 in qsort_r () from /lib64/libc.so.6
> #3  0x00000000005895af in help_unknown_cmd (cmd=cmd@entry=0x7fffffffdaf2 "foo") at util/help-unknown-cmd.c:71
> #4  0x000000000040cb52 in main (argc=1, argv=0x7fffffffd750) at perf.c:543
>
>
> commit 657a3efee43a29d13c4f30e4c8f6a178fd2bf14a
> Author: Ian Rogers <irogers@google.com>
> Date:   Sun Jun 11 16:36:06 2023 -0700
>
>     lib subcmd: Avoid memory leak in exclude_cmds
>
>     exclude_cmds will shorten the cmds names array, before doing so free the
>     removed entry.

Thanks Andi, this was also reported by Anup in the office hours.

The regression is fixed by:
https://lore.kernel.org/lkml/ZK2xk2qJE2M+bGCb@kernel.org/
which is already merged and should merge through to other trees.

Thanks,
Ian

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-07-13 21:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-13 16:42 perf command line error handling regression Andi Kleen
2023-07-13 21:29 ` Ian Rogers

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).