[llvm-bugs] [Bug 40866] New: Improve error message for malformed ELF

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Feb 26 06:03:00 PST 2019


https://bugs.llvm.org/show_bug.cgi?id=40866

            Bug ID: 40866
           Summary: Improve error message for malformed ELF
           Product: tools
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: llvm-readobj
          Assignee: unassignedbugs at nondot.org
          Reporter: jh7370.2008 at my.bristol.ac.uk
                CC: jh7370.2008 at my.bristol.ac.uk, llvm-bugs at lists.llvm.org

The error message produced by llvm-readobj when there is a parse failure is
unhelpful:

"Error reading file: Invalid data was encountered while parsing the file."

In the particular case I'm seeing it, the file has been modified such that the
offset/size fields of the dynamic segment point after the end of the file.
Ideally the error message would say what went wrong specifically, e.g.
"PT_DYNAMIC segment does not appear to be wholly within the file. p_offset =
0x1234, p_filesz = 0x4321, file size = 0x1000".

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20190226/85b55f57/attachment.html>


More information about the llvm-bugs mailing list