Ensure the program_headers call will fail correctly if the program
headers are larger than the underlying buffer. New test to ensure
llvm-objdump can safely process a invalid phdr in a elf file.
Details
Diff Detail
Event Timeline
I am unable to construct a correctly malformed file with yaml2obj, but was able to create a test with hexedit.
This is my first time committing a patch to LLVM and was wondering, do I have to use arc to submit a patch with a binary file? And should I do that as a follow up commit or a whole new review and one patch?
I'm surprised you can't craft with yaml2obj. What's the problem? If it's a limitation in yaml2obj we might consider fixing it.
This is my first time committing a patch to LLVM and was wondering, do I have to use arc to submit a patch with a binary file? And should I do that as a follow up commit or a whole new review and one patch?
You should attach your test (whatever it is) to the same patch, so it's grouped logically (and it' easier to bisect, revert, doing archeology, etc..)
The simplest way to trigger this issue is by adjusting the phoff in the elf header and that did not appear to be controllable from my read of the yaml2obj code at: https://github.com/llvm-mirror/llvm/blob/master/tools/yaml2obj/yaml2elf.cpp#L180
I updated the diff to correctly use FileCheck with the llvm-objdump output and clang-formated the code in ELF.h. I don't have commit access so if you could commit on my behalf that would be great.
include/llvm/Object/ELF.h | ||
---|---|---|
147 | Is there a way to cleanly run clang-format across the build to double check for myself? |
is this clang formatted?