Skip to content

Crash when calling demangle_generic with None as mangled_name parameter #7971

@Lidenburg

Description

@Lidenburg

Version and Platform (required):

  • Binary Ninja Version: 5.2.8722 (stable) and 5.3.9139 (dev)
  • Edition: Non-Commercial
  • OS: Ubuntu Linux
  • OS Version: 22.04
  • CPU Architecture: x86_64

Bug Description:
Running the python one-liner demangle_generic(bv.arch, None) causes binary ninja to crash.
The following is the stacktrace from 5.2.8722 (stable):

$ ~/binaryninja/binaryninja `which ls`
Terminating with uncaught exception
Here's a stack trace (hopefully):
/home/user/binaryninja/binaryninja(+0xee477) [0x60d7dc297477]
/lib/x86_64-linux-gnu/libstdc++.so.6(+0xae20c) [0x76cd28cae20c]
/lib/x86_64-linux-gnu/libstdc++.so.6(+0xae277) [0x76cd28cae277]
/lib/x86_64-linux-gnu/libstdc++.so.6(+0xae4d8) [0x76cd28cae4d8]
/lib/x86_64-linux-gnu/libstdc++.so.6(_ZSt19__throw_logic_errorPKc+0x40) [0x76cd28ca5344]
/home/user/binaryninja/libbinaryninjacore.so.1(+0x107aef1) [0x76cd2b27aef1]
/home/user/binaryninja/libbinaryninjacore.so.1(BNDemangleGeneric+0x93) [0x76cd2b27c2c3]
/lib/x86_64-linux-gnu/libffi.so.8(+0x7e2e) [0x76cd24064e2e]

Steps To Reproduce:

  1. Open any binary (tested with arm binaries and x86_64)
  2. open the python console
  3. type demangle_generic(bv.arch, None)
  4. Binary Ninja crashes

Expected Behavior:
Binary ninja should not crash.

Screenshots/Video Recording:

Binary:
Any binary should work. Tested against x86_64 ls.

Additional Information:

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions