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

Sanjin Sijaric via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 19 12:43:13 PDT 2018


ssijaric added inline comments.


================
Comment at: tools/llvm-readobj/ARMWinEHPrinter.cpp:789
+          SW.startLine() << format("The last opcode is likely bad, as we have "
+                                   "gone past the unwind data");
+        break;
----------------
efriedma wrote:
> It's wrong to read past the end of the section, and then print an error afterwards, rather than checking before you read the data; you can't print an error after llvm-readobj crashes.  (You're only reading a few bytes past the end of the section, so you can get away with it sometimes, but not in general.)
> 
> Maybe the RingEntry should contain the opcode size.
I will change it, but I also have to account for the ARM opcode length as well then.  This can just introduce more problems if I get the unwind length wrong.  Error handling in llvm-readobj is not the intent of this particular patch.


Repository:
  rL LLVM

https://reviews.llvm.org/D53264





More information about the llvm-commits mailing list