[lld] 0bd1471 - [lld-macho] Change personalities entry type to Ptr to avoid overflowing uint32
Vy Nguyen via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 29 11:29:04 PDT 2021
Author: Vy Nguyen
Date: 2021-07-29T14:26:07-04:00
New Revision: 0bd14711ac4a5d7974473b32b0b5315b054cb77e
URL: https://github.com/llvm/llvm-project/commit/0bd14711ac4a5d7974473b32b0b5315b054cb77e
DIFF: https://github.com/llvm/llvm-project/commit/0bd14711ac4a5d7974473b32b0b5315b054cb77e.diff
LOG: [lld-macho] Change personalities entry type to Ptr to avoid overflowing uint32
PR51262
Differential Revision: https://reviews.llvm.org/D107035
Added:
Modified:
lld/MachO/UnwindInfoSection.cpp
Removed:
################################################################################
diff --git a/lld/MachO/UnwindInfoSection.cpp b/lld/MachO/UnwindInfoSection.cpp
index 3efc646c2ad2..5405be199cd7 100644
--- a/lld/MachO/UnwindInfoSection.cpp
+++ b/lld/MachO/UnwindInfoSection.cpp
@@ -115,7 +115,7 @@ class UnwindInfoSectionImpl final : public UnwindInfoSection {
std::vector<std::pair<compact_unwind_encoding_t, size_t>> commonEncodings;
EncodingMap commonEncodingIndexes;
// Indices of personality functions within the GOT.
- std::vector<uint32_t> personalities;
+ std::vector<Ptr> personalities;
SmallDenseMap<std::pair<InputSection *, uint64_t /* addend */>, Symbol *>
personalityTable;
std::vector<unwind_info_section_header_lsda_index_entry> lsdaEntries;
@@ -286,7 +286,7 @@ relocateCompactUnwind(ConcatOutputSection *compactUnwindSection,
template <class Ptr>
static void
encodePersonalities(const std::vector<CompactUnwindEntry<Ptr> *> &cuPtrVector,
- std::vector<uint32_t> &personalities) {
+ std::vector<Ptr> &personalities) {
for (CompactUnwindEntry<Ptr> *cu : cuPtrVector) {
if (cu->personality == 0)
continue;
More information about the llvm-commits
mailing list