[PATCH] D69192: llvm-objdump can error out with an unexpected EOF error if .bss is larger than the file being dumped.

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 23 16:14:02 PDT 2019


MaskRay added inline comments.


================
Comment at: llvm/include/llvm/Object/ELFObjectFile.h:727
+  if (EShdr->sh_type == ELF::SHT_NOBITS)
+    return makeArrayRef((const uint8_t *)base() + EShdr->sh_offset, 0);
   if (std::error_code EC =
----------------
Delete `+ sh_offset` to solve the problem I described in a previous comment.


Repository:
  rL LLVM

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

https://reviews.llvm.org/D69192





More information about the llvm-commits mailing list