1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 03:53:04 +02:00
llvm-mirror/lib/DebugInfo/PDB
Zachary Turner 666f8c1f01 [PDB] Don't ignore bucket 0 when writing the PDB string table.
The hash table is a list of buckets, and the *value* stored in
the bucket cannot be 0 since that is reserved.  However, the code
here was incorrectly skipping over the 0'th bucket entirely.
The 0'th bucket is perfectly fine, just none of these buckets
can contain the value 0.

As a result, whenever there was a string where hash(S) % Size
was equal to 0, we would write the value in the next bucket
instead.  We never caught this in our tests due to *another*
bug, which is that we would iterate the entire list of buckets
looking for the value, only using the hash value as a starting
point.  However, the real algorithm stops when it finds 0 in
a bucket since it takes that to mean "the item is not in the
hash table".

The unit test is updated to carefully construct a set of hash
values that will cause one item to hash to 0 mod bucket count,
and the reader is also updated to return an error indicating that
the item is not found when it encounters a 0 bucket.

llvm-svn: 328162
2018-03-21 22:23:59 +00:00
..
DIA [PDB] Remove unused private variable, re-applying r327900 after relanding more natvis changes[4~ 2018-03-21 21:47:26 +00:00
Native [PDB] Don't ignore bucket 0 when writing the PDB string table. 2018-03-21 22:23:59 +00:00
CMakeLists.txt [PDB] Support dumping injected sources via the DIA reader. 2018-03-13 17:46:06 +00:00
GenericError.cpp [PDB] Fix type server handling for archives 2017-07-13 20:12:23 +00:00
IPDBSourceFile.cpp [DebugInfo] Fix some Clang-tidy modernize-use-default and Include What You Use warnings; other minor fixes (NFC). 2016-11-23 23:16:32 +00:00
LLVMBuild.txt [msf] Resubmit "Rename Msf -> MSF". 2016-07-29 20:56:36 +00:00
PDB.cpp Don't #include MemoryBuffer.h from Host.h. 2017-11-17 01:00:35 +00:00
PDBContext.cpp Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
PDBExtras.cpp [PDB] Support dumping injected sources via the DIA reader. 2018-03-13 17:46:06 +00:00
PDBInterfaceAnchors.cpp [PDB] Support dumping injected sources via the DIA reader. 2018-03-13 17:46:06 +00:00
PDBSymbol.cpp [llvm-pdbdump] Recursively dump class layout. 2017-04-13 21:11:00 +00:00
PDBSymbolAnnotation.cpp General usability improvements to generic PDB library. 2017-04-10 06:14:09 +00:00
PDBSymbolBlock.cpp Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
PDBSymbolCompiland.cpp [PDB] Add a method to get the full path of the source file for PDBSymbolCompiland 2018-03-19 21:20:04 +00:00
PDBSymbolCompilandDetails.cpp Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
PDBSymbolCompilandEnv.cpp Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
PDBSymbolCustom.cpp Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
PDBSymbolData.cpp General usability improvements to generic PDB library. 2017-04-10 06:14:09 +00:00
PDBSymbolExe.cpp [llvm-pdbdump] More advanced class definition dumping. 2017-04-12 23:18:21 +00:00
PDBSymbolFunc.cpp [PDB] Add exclusive methods to derived symbol class 2018-03-19 21:18:39 +00:00
PDBSymbolFuncDebugEnd.cpp Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
PDBSymbolFuncDebugStart.cpp Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
PDBSymbolLabel.cpp General usability improvements to generic PDB library. 2017-04-10 06:14:09 +00:00
PDBSymbolPublicSymbol.cpp Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
PDBSymbolThunk.cpp General usability improvements to generic PDB library. 2017-04-10 06:14:09 +00:00
PDBSymbolTypeArray.cpp Remove redundant includes from lib/DebugInfo. 2017-12-13 21:30:49 +00:00
PDBSymbolTypeBaseClass.cpp Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
PDBSymbolTypeBuiltin.cpp General usability improvements to generic PDB library. 2017-04-10 06:14:09 +00:00
PDBSymbolTypeCustom.cpp Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
PDBSymbolTypeDimension.cpp Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
PDBSymbolTypeEnum.cpp Remove redundant includes from lib/DebugInfo. 2017-12-13 21:30:49 +00:00
PDBSymbolTypeFriend.cpp Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
PDBSymbolTypeFunctionArg.cpp General usability improvements to generic PDB library. 2017-04-10 06:14:09 +00:00
PDBSymbolTypeFunctionSig.cpp Fix pretty printing the unspecified param of a variadic function 2018-01-17 01:22:03 +00:00
PDBSymbolTypeManaged.cpp Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
PDBSymbolTypePointer.cpp Improves pretty printing of variable types in llvm-pdbdump 2017-04-10 16:43:09 +00:00
PDBSymbolTypeTypedef.cpp General usability improvements to generic PDB library. 2017-04-10 06:14:09 +00:00
PDBSymbolTypeUDT.cpp Remove redundant includes from lib/DebugInfo. 2017-12-13 21:30:49 +00:00
PDBSymbolTypeVTable.cpp General usability improvements to generic PDB library. 2017-04-10 06:14:09 +00:00
PDBSymbolTypeVTableShape.cpp Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
PDBSymbolUnknown.cpp Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
PDBSymbolUsingNamespace.cpp Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
PDBSymDumper.cpp [DebugInfo] Fix some Clang-tidy modernize-use-default and Include What You Use warnings; other minor fixes (NFC). 2016-11-23 23:16:32 +00:00
UDTLayout.cpp [CodeView, PDB] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-06-30 23:06:03 +00:00