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

Types using inheritance don't properly import from Type Librarires #4890

Closed
op2786 opened this issue Jan 12, 2024 · 2 comments
Closed

Types using inheritance don't properly import from Type Librarires #4890

op2786 opened this issue Jan 12, 2024 · 2 comments
Assignees
Labels
Component: Type Libraries Impact: Critical Issue blocks CRITICAL functionality Type: Bug Issue is a non-crashing bug with repro steps UI: Types Issues with the Types widget
Milestone

Comments

@op2786
Copy link
Contributor

op2786 commented Jan 12, 2024

Version and Platform (required):

  • Binary Ninja Version: 3.6.4764-dev, 1e8f4a9b
  • OS: macos
  • OS Version: 14.2
  • CPU Architecture: arm64

I have a binary that uses IDebugClient5 which according to current type definition inherites from IUnknown_1. (According to MSDN it should inherit from IDebugClient4 but that is another story)

This is what I got in decompiler output when code tries to use DebugClient5->QueryInterface function. Which is actually defined in IUnknown_1.

So there is something wrong with these definitions. When I check out the type looks like IDebugClient5 does not inherites from IUnknown_1 correctly. Show inherited members option is enabled in screenshot below:

Screenshot 2024-01-12 at 15 58 53

I guess IDebugClient5 should have QueryInterface, AddRef and Release member inherited from IUnknown_1 but it does not so the decompiler output is not show correct function call.

I guess this could also affect the other structures too.

Could be related to #4139.

@plafosse
Copy link
Member

I haven't been able to verify if this is indeed a problem but in the win32metadata source that is not the case:
image

@xusheng6 xusheng6 added the State: Awaiting Triage Issue is waiting for more in-depth triage from a developer label Jan 15, 2024
@plafosse plafosse added this to the Dorsai milestone Jan 23, 2024
@plafosse plafosse changed the title Interface types have buggy inherit from base class Types using inheritance don't properly import from Type Librarires Jan 23, 2024
@plafosse plafosse added Impact: Critical Issue blocks CRITICAL functionality Type: Bug Issue is a non-crashing bug with repro steps Component: Type Libraries UI: Types Issues with the Types widget and removed State: Awaiting Triage Issue is waiting for more in-depth triage from a developer labels Jan 23, 2024
@plafosse
Copy link
Member

This should be fixed in 3.6.4794

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Type Libraries Impact: Critical Issue blocks CRITICAL functionality Type: Bug Issue is a non-crashing bug with repro steps UI: Types Issues with the Types widget
Projects
None yet
Development

No branches or pull requests

3 participants