[PATCH] D29090: [pdb] Correctly parse hash adjusters table

Zachary Turner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 24 10:43:56 PST 2017


zturner created this revision.

This is not a list of pairs, it is a hash table data structure.  We now correctly parse this out.  It's hard to write a test for this, because doing so would require we have a PDB with hash adjusters, and they are only generated in the case of collisions, which typically require a very large PDB.

I plan to do some follow-up analysis and see if I can manually create some types that will collide by examining the collisions of a large PDB and carefully choosing some types.  If that is successful, I can construct a minimal PDB with collisions and add a test case for them.  In the meantime, here is a sample of the output when run against a very large PDB that does have collisions.

  Adjusters [
    {
      Type: llvm::SmallVectorStorage<llvm::cl::OptionEnumValue,4>
      TI: 0x4DBA
    }
    {
      Type: llvm::SmallVectorStorage<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,2>
      TI: 0x3C97
    }
    {
      Type: llvm::SmallVectorTemplateCommon<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,void>
      TI: 0x3D12
    }
    {
      Type: llvm::SmallVectorStorage<char,32>
      TI: 0x4305
    }
    {
      Type: llvm::ErrorOr<llvm::sys::fs::space_info>
      TI: 0x4302
    }
    {
      Type: llvm::SmallVectorStorage<char,260>
      TI: 0x30D0
    }
    {
      Type: llvm::SmallVectorStorage<void *,4>
      TI: 0x46FC
    }
    {
      Type: llvm::SmallVectorTemplateCommon<wchar_t,void>
      TI: 0x2E90
    }
    {
      Type: llvm::SmallVectorStorage<char,64>
      TI: 0x30A6
    }


https://reviews.llvm.org/D29090

Files:
  llvm/include/llvm/DebugInfo/PDB/Raw/TpiStream.h
  llvm/lib/DebugInfo/PDB/Raw/TpiStream.cpp
  llvm/test/DebugInfo/PDB/pdbdump-headers.test
  llvm/tools/llvm-pdbdump/LLVMOutputStyle.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D29090.85610.patch
Type: text/x-patch
Size: 11143 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170124/cbbe8aa6/attachment-0001.bin>


More information about the llvm-commits mailing list