[PATCH] D38512: Added phdr upper bound checks to ElfObject

Rafael Avila de Espindola via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 4 13:52:31 PDT 2017


Parker Thompson via Phabricator <reviews at reviews.llvm.org> writes:

> mothran updated this revision to Diff 117723.
> mothran edited the summary of this revision.
>
> https://reviews.llvm.org/D38512
>
> Files:
>   include/llvm/Object/ELF.h
>   test/Object/Inputs/invalid-phdr.elf
>   test/Object/elf-invalid-phdr.test
>
>
> Index: test/Object/elf-invalid-phdr.test
> ===================================================================
> --- /dev/null
> +++ test/Object/elf-invalid-phdr.test
> @@ -0,0 +1,3 @@
> +RUN: not llvm-objdump -private-headers %p/Inputs/invalid-phdr.elf
> +
> +LLVM ERROR: Invalid data was encountered while parsing the file

You are missing a call to FileCheck to check what the error was.

Cheers,
Rafael


More information about the llvm-commits mailing list