[PATCH] D53264: [ARM64] [Windows] Add unwind support to llvm-readobj
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 19 13:09:16 PDT 2018
efriedma 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;
----------------
ssijaric wrote:
> 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.
If you want to add a FIXME and leave it for a followup, that's okay, I think.
Repository:
rL LLVM
https://reviews.llvm.org/D53264
More information about the llvm-commits
mailing list