- we use the unsigned type for NextOffset,PrevOffset ,GlobalSymbolOffset , MemberTableSize, it will caused a malform big archive when the archive file size is large than 4G.
- also fix a NFC comment on https://reviews.llvm.org/D142479#inline-1443927
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Sorry for not getting around to reviewing many of your patches. I'm very heavily loaded with my regular work commitments, and will be for the next couple of weeks at least. I'm just trying to review smaller patches in the meantime.
llvm/lib/Object/ArchiveWriter.cpp | ||
---|---|---|
708 | Why is uint16_t appropriate here? I don't think it's unfeasible for an archive to several several hundred thousand members in particularly big project. I'd stick with uint32_t unless this value directly matches up with a file format member that restricts it to uint16_t. |
llvm/lib/Object/ArchiveWriter.cpp | ||
---|---|---|
708 | According to the definition of getSymbols() function , it should be uint16_t Index. https://github.com/llvm/llvm-project/blob/main/llvm/lib/Object/ArchiveWriter.cpp#L582 static Expected<std::vector<unsigned>> SymMap *SymMap, bool &HasObject) https://github.com/llvm/llvm-project/blob/main/llvm/lib/Object/ArchiveWriter.cpp#L50 struct SymMap { bool UseECMap; std::map<std::string, uint16_t> Map; std::map<std::string, uint16_t> ECMap; }; |
Hi James, Please don't worry about the delay in reviewing the patches. . I completely understand your work load , and I'm grateful for any time you can spare. thank you very much for your time and your professional comments.
Why is uint16_t appropriate here? I don't think it's unfeasible for an archive to several several hundred thousand members in particularly big project. I'd stick with uint32_t unless this value directly matches up with a file format member that restricts it to uint16_t.