binaryninja-api icon indicating copy to clipboard operation
binaryninja-api copied to clipboard

Nondeterminism in pdb symbols

Open CouleeApps opened this issue 1 year ago • 0 comments

Version and Platform (required):

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

Bug Description: I have this pdb I'm loading, and some of the VTable symbols it finds change between different loads.

Steps To Reproduce:

  1. Open this binary: Archive.zip
  2. Navigate to 0x409c3c
  3. Does this a couple more times
  4. Observe the symbol at 0x409c3c takes one of two forms:
00409c3c  struct Dog::VTable Dog::`vftable' = 
00409c3c  {
00409c3c      void (* woof)(class Dog const* this) = j_Dog::describe
00409c40      void* (* __vecDelDtor)(class Dog* this, uint32_t) = j_Dog::`vector deleting destructor'
00409c44  }

00409c3c  struct Animal::VTable Dog::`vftable'{for `Animal'} = 
00409c3c  {
00409c3c      void (* describe)(class Animal const* this) = j_Dog::describe
00409c40  }

Expected Behavior: I expected the results from loading a PDB to be consistent across runs.

Additional Information: Likely something to do with both the debuginfo loading symbol queue and the hashmap-by-name order leading to two symbols at the same address with equal confidence racing to apply

CouleeApps avatar Apr 23 '24 19:04 CouleeApps