[llvm-bugs] [Bug 42122] New: Emit error and don't crash if program header reaches past end of file
via llvm-bugs
llvm-bugs at lists.llvm.org
Tue Jun 4 08:49:08 PDT 2019
https://bugs.llvm.org/show_bug.cgi?id=42122
Bug ID: 42122
Summary: Emit error and don't crash if program header reaches
past end of file
Product: tools
Version: trunk
Hardware: PC
OS: Windows NT
Status: NEW
Severity: normal
Priority: P
Component: llvm-objcopy/strip
Assignee: unassignedbugs at nondot.org
Reporter: jh7370.2008 at my.bristol.ac.uk
CC: alexander.v.shaposhnikov at gmail.com,
jake.h.ehrlich at gmail.com,
jh7370.2008 at my.bristol.ac.uk,
llvm-bugs at lists.llvm.org, rupprecht at google.com
If you attempt to run llvm-objcopy on the object file produced by yaml2obj for
the below YAML, it crashes, when it should really just emit an error saying
that the program header is malformed.
Example yaml2obj input:
--- !ELF
FileHeader:
Class: ELFCLASS64
Data: ELFDATA2LSB
Type: ET_EXEC
Machine: EM_X86_64
Sections:
- Name: .foo
Type: SHT_PROGBITS
Size: 1
AddressAlign: 0x1000
ProgramHeaders:
- Type: PT_LOAD
FileSize: 0x100000
Sections:
- Section: .foo
C:\Work\TempWork> C:\llvm\build\Debug\bin\llvm-objcopy test.o test2.o
Stack dump:
<snip>
--
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/20190604/8507a9ac/attachment.html>
More information about the llvm-bugs
mailing list