[PATCH] D124223: [lld-macho] Fix ICF crash when comparing symbol relocs

Jez Ng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 22 12:24:28 PDT 2022


int3 marked 3 inline comments as done.
int3 added inline comments.


================
Comment at: lld/MachO/ICF.cpp:163
+      // For section relocs, we compare the content at the section offset.
+      return isecA->getOffset(ra.addend) == isecB->getOffset(rb.addend);
   };
----------------
thevinster wrote:
> Do you think it's worth keeping the previous behavior here and do `getOffset(value + ra.addend)` or is that not needed here? 
`valueA == valueB == 0` in this case so it isn't necessary. I'll add an assert


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D124223



More information about the llvm-commits mailing list