Vector35 / Vector35/binaryninja-api

PDB has incomplete vtable definition for type with subclasses

Open
#5,314 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Component: DebugInfo DebugInfo: PDB Impact: Medium
Dominant language
C++
Stars
1.3k
Forks
298
Avg merge
5d 5h
Merged PRs (30d)
19

Description

Version and Platform (required):

  • Binary Ninja Version: 4.1.5167-dev
  • OS: macOS
  • OS Version: 14
  • CPU Architecture: M1

Bug Description:
One of the VTables in my pdb was loaded missing a member, causing the size and subclasses to be slightly wrong. Upon further investigation in the pdb itself, this type actually had multiple definitions, leading to warnings being printed about them conflicting.

Steps To Reproduce:

  1. Open Archive.zip
  2. Observe warnings for "[Default warn] Found two types both named Animal, only one will be used."
  3. Observe Animal::VTable type
  4. Observe it does not have __vecDelDtor like many of the other VTable types
  5. Observe symbol at 0x409bc0 clearly showing that missing member in the VTable

Expected Behavior:
I expected __vecDelDtor to be on the vtable type considering it is present when the VTables are defined in code. I'm not sure what I expected in regards to the multiple copies of a type being defined, maybe some sort of deduplication?

Additional Information:
Not strictly a binja bug, that pdb has like 4 definitions of Animal and some of them legitimately do / do not have that function listed as a virtual member

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by opening the supplied Archive.zip and inspecting the conflicting Animal definitions, the generated Animal::VTable type, and the symbol at 0x409bc0. Compare how the four definitions represent __vecDelDtor and determine what behavior should apply when they conflict; done means the resulting vtable and subclass information match the relevant PDB definition without losing valid members.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
reverse-engineering
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.