[PATCH] D107035: [lld-macho] Change personalities entry type to Ptr to avoid overflowing uint32

Vy Nguyen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 29 11:29:09 PDT 2021


This revision was automatically updated to reflect the committed changes.
Closed by commit rG0bd14711ac4a: [lld-macho] Change personalities entry type to Ptr to avoid overflowing uint32 (authored by oontvoo).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D107035/new/

https://reviews.llvm.org/D107035

Files:
  lld/MachO/UnwindInfoSection.cpp


Index: lld/MachO/UnwindInfoSection.cpp
===================================================================
--- lld/MachO/UnwindInfoSection.cpp
+++ lld/MachO/UnwindInfoSection.cpp
@@ -115,7 +115,7 @@
   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 @@
 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;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D107035.362831.patch
Type: text/x-patch
Size: 973 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210729/9e7813d6/attachment.bin>


More information about the llvm-commits mailing list