[PATCH] D80380: [llvm-readobj] - Do not crash when an invalid .eh_frame_hdr is dumped using --unwind.

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 27 02:07:54 PDT 2020


jhenderson added inline comments.


================
Comment at: llvm/test/tools/llvm-readobj/ELF/unwind.test:305
+
+## Case C: test we report an error when the offset + the file size of the PT_GNU_EH_FRAME so large a
+##         value that it overflows the platform address size type.
----------------
so large -> is so large


================
Comment at: llvm/test/tools/llvm-readobj/ELF/unwind.test:327
+
+## Case D: test we report an error when the memory size differs from the file size for the PT_GNU_EH_FRAME header.
+# RUN: yaml2obj --docnum=5 %s -o %t11
----------------
Perhaps you should just keep Case D in a separate patch, and improve the error text at the same time. It's not really related to the rest of the changes you are making, I think. Anyway, why is this an error at all? I'm not convinced it's really anything to do with dumping. It might be some sort of validation error if we had something equivalent to llvm-dwarfdump --verify, but I'm not convinced it belongs in llvm-readelf as things stand.


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

https://reviews.llvm.org/D80380





More information about the llvm-commits mailing list