[PDB] Error on too large stream directories
authorHans Wennborg <hans@chromium.org>
Fri, 27 Jan 2023 17:33:02 +0000 (18:33 +0100)
committerHans Wennborg <hans@chromium.org>
Fri, 24 Feb 2023 14:07:11 +0000 (15:07 +0100)
commit724b58f76691e5633fc9e2e19d64e476b0c7845e
tree01d43c5f12b9fe772fb0278736a3a6f865f4c25e
parentc6f64c5d887c3f5aa88515d749bb2a115b8226eb
[PDB] Error on too large stream directories

We hit this in Chromium builds where the PDB file was just under 4GB,
but the stream directory was actually too large to be correctly
represented.

llvm-pdbutil would error about this in llvm::msf::validateSuperBlock,
but lld should not write such PDB files in the first place.

Differential revision: https://reviews.llvm.org/D144385
lld/COFF/PDB.cpp
llvm/include/llvm/DebugInfo/MSF/MSFError.h
llvm/lib/DebugInfo/MSF/MSFBuilder.cpp
llvm/lib/DebugInfo/MSF/MSFError.cpp