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

apply_auto_discovered_type #3222

Closed
ea opened this issue Jun 27, 2022 · 5 comments
Closed

apply_auto_discovered_type #3222

ea opened this issue Jun 27, 2022 · 5 comments
Labels
Type: Bug Issue is a non-crashing bug with repro steps Type: Crash Issue is a crash or deadlock
Milestone

Comments

@ea
Copy link

ea commented Jun 27, 2022

Version and Platform (required):

  • Version: 3.1.3523-dev
  • OS: macOS
  • OS Version: 12
  • CPU Architecture x64

Bug Description:

Seems like apply_auto_discovered_type easily crashes whole Binary Ninja when trying to apply a type with unknown (or empty) struct. It seems to me like it crashes after the type is applied.

Steps To Reproduce:
Please provide all steps required to reproduce the behavior:

  1. Go to any function
  2. make sure struct in_addr is NOT defined.
  3. execute current_function.apply_auto_discovered_type("char *a (const struct in_addr *arg1, char *s);")
  4. Binja should crash

Expected Behavior:
Expecting an error of some sort?

Additional Information:
This can obviously be worked around and it's my fault for not defining the struct first, but I thought i should report it.
Cheers!

@negasora
Copy link
Member

I can't reproduce with 3.1.3539-dev

@negasora negasora added the State: Unreproducible Issue could not be reproduced by a developer label Jun 29, 2022
@ea
Copy link
Author

ea commented Jun 29, 2022

Weird , here's how i reproduce it:
Screen Shot 2022-06-29 at 4 03 06 PM

As soon as i hit return , crashes.
Attaching a crashdump as well in case that might be helpful, but i don't really see anything outright useful in it.

struct_crash_report.txt

@ea
Copy link
Author

ea commented Jun 29, 2022

Should add, the above binary is just /bin/cat on macOS

@negasora negasora added Type: Bug Issue is a non-crashing bug with repro steps Type: Crash Issue is a crash or deadlock and removed State: Unreproducible Issue could not be reproduced by a developer labels Jun 29, 2022
@negasora
Copy link
Member

Tried on a different binary and it repro'd, ty!

@negasora
Copy link
Member

Fixed in 3.1.3542-dev

@plafosse plafosse added this to the 3.2 (Windows) milestone Oct 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue is a non-crashing bug with repro steps Type: Crash Issue is a crash or deadlock
Projects
None yet
Development

No branches or pull requests

3 participants