[llvm-readobj] - Do not crash when an invalid .eh_frame_hdr is dumped using --unwind.
When the p_offset/p_filesz of the PT_GNU_EH_FRAME is invalid (e.g larger than the file size) then llvm-readobj might crash. This patch fixes the issue. I've introduced `ELFFile<ELFT>::getSegmentContent` method, which is very similar to `ELFFile<ELFT>::getSectionContentsAsArray` one. Differential revision: https://reviews.llvm.org/D80380
Loading
Please sign in to comment