[PATCH] D78946: [llvm-objcopy][MachO] Handle relocations where r_extern is 0

Shoaib Meenai via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 27 15:39:41 PDT 2020


smeenai added inline comments.


================
Comment at: llvm/tools/llvm-objcopy/MachO/MachOReader.cpp:222
+          } else {
+            assert(SymbolNum >= 1 && SymbolNum <= Sections.size() &&
+                   "Invalid section index.");
----------------
alexshap wrote:
> smeenai wrote:
> > Should this be a user-visible error instead? It can happen for a malformed input file, for example.
> yup, it should, i looked into this yesterday, so the interface of Reader needs some adjustments (to improve error handling). I'd prefer to add FIXME or TODO, this diff (I mean @seiya's) has been around for so long and it's really blocking me now in many ways, so would be good to commit it and refactor error handling on a separate diff.
Sure, adding a TODO or FIXME and looking into this in a follow-up is good with me.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D78946





More information about the llvm-commits mailing list