[PATCH] D53264: [ARM64] [Windows] Add unwind support to llvm-readobj

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 22 12:49:17 PDT 2018


efriedma accepted this revision.
efriedma added a comment.

LGTM, with a couple minor comments.



================
Comment at: tools/llvm-readobj/ARMWinEHPrinter.cpp:746
+                           bool Prologue) {
+  assert(Prologue && "mov fp, sp only valid in a prologue");
+  SW.startLine() << format("0x%02x                ; mov fp, sp\n", OC[Offset]);
----------------
Please remove this assertion; even if it isn't valid, it shouldn't crash.  Same for addfp.  (I guess you could add an error message to the output, but that doesn't seem too important.)


================
Comment at: tools/llvm-readobj/ARMWinEHPrinter.cpp:801
+      }
+      if ((isAArch64 && (DI >= array_lengthof(Ring64))) ||
+          (!isAArch64 && (DI >= array_lengthof(Ring)))) {
----------------
Please make sure this isn't reading past the end of the Ring64 array.  (It looks like it might read one element past the end?)


https://reviews.llvm.org/D53264





More information about the llvm-commits mailing list