Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"./misc/demangler --unknown" triggers segfault #1939

Closed
honggyukim opened this issue Jun 29, 2024 · 0 comments · Fixed by #1940
Closed

"./misc/demangler --unknown" triggers segfault #1939

honggyukim opened this issue Jun 29, 2024 · 0 comments · Fixed by #1940
Labels

Comments

@honggyukim
Copy link
Collaborator

The following command triggers segfault. It seems like it doesn't handle unknown long options properly.

$ ./misc/demangler --unknown
@honggyukim honggyukim added the bug label Jun 29, 2024
kangtegong added a commit to kangtegong/uftrace that referenced this issue Jun 29, 2024
This commit adds support for the -h and --help options to display
usage of misc/demangler like follows.

  $ misc/demangler -h
  demangler v0.11-683-g804a ( x86_64 dwarf python3 luajit tui perf sched dynamic kernel )

   OPTION:
        --simple           Use internal simple demangler (default)
        --full             Use libstdc++ demangler
        --no               Do not use demangler
    -v, --verbose          Be verbose
    -h, --help             Display this help and exit

An end marker has also been added to the demangler_options array to ensure
proper termination and prevent potential undefined behavior.

Fixed: namhyung#1939

Signed-off-by: Kang Minchul <tegongkang@gmail.com>
kangtegong added a commit to kangtegong/uftrace that referenced this issue Jun 29, 2024
This commit adds support for the -h and --help options to display
usage of misc/demangler like follows.

  $ misc/demangler -h
  demangler v0.11-683-g804a

   OPTION:
        --simple           Use internal simple demangler (default)
        --full             Use libstdc++ demangler
        --no               Do not use demangler
    -v, --verbose          Be verbose
    -h, --help             Display this help and exit

An end marker has also been added to the demangler_options array to ensure
proper termination and prevent potential undefined behavior.

Fixed: namhyung#1939

Signed-off-by: Kang Minchul <tegongkang@gmail.com>
kangtegong added a commit to kangtegong/uftrace that referenced this issue Jun 29, 2024
This commit adds support for the -h and --help options to display
usage of misc/demangler like follows.

  $ misc/demangler -h
  demangler v0.11-683-g804a

   OPTION:
        --simple           Use internal simple demangler (default)
        --full             Use libstdc++ demangler
        --no               Do not use demangler
    -v, --verbose          Be verbose
    -h, --help             Display this help and exit

An end marker has also been added to the demangler_options array for
proper termination and prevent potential undefined behavior.

Fixed: namhyung#1939

Signed-off-by: Kang Minchul <tegongkang@gmail.com>
kangtegong added a commit to kangtegong/uftrace that referenced this issue Jun 29, 2024
This commit adds support for the -h and --help options to display
usage of misc/demangler like follows.

  $ misc/demangler -h
  demangler v0.11-683-g804a

   OPTION:
        --simple           Use internal simple demangler (default)
        --full             Use libstdc++ demangler
        --no               Do not use demangler
    -v, --verbose          Be verbose
    -h, --help             Display this help and exit

An end marker has also been added to the demangler_options array for
proper termination and prevent potential undefined behavior.

Fixed: namhyung#1939

Signed-off-by: Kang Minchul <tegongkang@gmail.com>
kangtegong added a commit to kangtegong/uftrace that referenced this issue Jun 30, 2024
This commit adds support for the -h and --help options to display
usage of misc/demangler like follows.

  $ misc/demangler -h
  demangler v0.11-683-g804a

   OPTION:
        --simple           Use internal simple demangler (default)
        --full             Use libstdc++ demangler
        --no               Do not use demangler
    -v, --verbose          Be verbose
    -h, --help             Display this help and exit

An end marker has also been added to the demangler_options array for
proper termination and prevent potential undefined behavior.

Fixed: namhyung#1939

Signed-off-by: Kang Minchul <tegongkang@gmail.com>
honggyukim pushed a commit that referenced this issue Aug 14, 2024
This commit adds support for the -h and --help options to display
usage of misc/demangler like follows.

  $ misc/demangler -h
  demangler v0.11-683-g804a

   OPTION:
        --simple           Use internal simple demangler (default)
        --full             Use libstdc++ demangler
        --no               Do not use demangler
    -v, --verbose          Be verbose
    -h, --help             Display this help and exit

An end marker has also been added to the demangler_options array for
proper termination and prevent potential undefined behavior.

Fixed: #1939

Signed-off-by: Kang Minchul <tegongkang@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant