[PATCH] D53264: [ARM64] [Windows] Add unwind support to llvm-readobj
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 16 16:10:44 PDT 2018
efriedma added a subscriber: compnerd.
efriedma added inline comments.
================
Comment at: tools/llvm-readobj/ARMWinEHPrinter.cpp:788
}
- assert(DI < array_lengthof(Ring) && "unhandled opcode");
+ if ((isAArch64 && (DI >= array_lengthof(Ring))) ||
+ (!isAArch64 && (DI >= array_lengthof(Ring)))) {
----------------
Ring64
================
Comment at: tools/llvm-readobj/ARMWinEHPrinter.cpp:790
+ (!isAArch64 && (DI >= array_lengthof(Ring)))) {
+ SW.startLine() << format("0x%02x ; Bad opcode!\n", Opcodes.data()[Offset]);
+ ++OI;
----------------
80 columns
================
Comment at: tools/llvm-readobj/ARMWinEHPrinter.cpp:791
+ SW.startLine() << format("0x%02x ; Bad opcode!\n", Opcodes.data()[Offset]);
+ ++OI;
+ }
----------------
`break;`
================
Comment at: tools/llvm-readobj/ARMWinEHPrinter.cpp:836
+ llvm::errs() << "llvm-readobj doesn't yet support COFF unwind info that "
+ "requires Extended Epilog Count and Extended Code Words.\n";
+ return false;
----------------
I thought you implemented this...? At least at first glance, ExceptionDataRecord tries to do the right thing.
================
Comment at: tools/llvm-readobj/ARMWinEHPrinter.cpp:840
+ if (Contents.size() - Offset - 4 -
+ (XData.E() ? 0 : XData.EpilogueCount() * 4) < ByteCodeLength)
+ report_fatal_error("Malformed unwind data");
----------------
I think the subtraction here can overflow.
Repository:
rL LLVM
https://reviews.llvm.org/D53264
More information about the llvm-commits
mailing list