The code we use to read PDBs assumed that streams we ask it to read exist, and would read memory outside a vector and crash if this wasn't the case. This would, for example, cause llvm-pdbdump to crash on PDBs generated by lld. This patch handles such cases more gracefully: the PDB reading code in LLVM now reports errors when asked to get a stream that is not present, and llvm-pdbdump will report missing streams and continue processing streams that are present.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
include/llvm/DebugInfo/PDB/Raw/PDBFile.h | ||
---|---|---|
99–105 ↗ | (On Diff #80000) | The various get* methods above are not const, so when the has* method has to call a get* method, it can't be const. The common case is when a has* method needs to look at the DBI stream to determine the index of the stream whose existence is being tested. |