[llvm] r239125 - Revert "[Object, ELF] Fix segmentation fault in ELFFile::getSectionName()."

Eric Christopher echristo at gmail.com
Thu Jun 4 17:14:59 PDT 2015


Any reason, or just a hatred toward the number 239124?

-eric

On Thu, Jun 4, 2015 at 5:14 PM Alexey Samsonov <vonosmas at gmail.com> wrote:

> Author: samsonov
> Date: Thu Jun  4 18:58:31 2015
> New Revision: 239125
>
> URL: http://llvm.org/viewvc/llvm-project?rev=239125&view=rev
> Log:
> Revert "[Object, ELF] Fix segmentation fault in ELFFile::getSectionName()."
>
> This reverts commit r239124.
>
> Removed:
>     llvm/trunk/test/DebugInfo/Inputs/invalid.elf.no-shstrtab
> Modified:
>     llvm/trunk/include/llvm/Object/ELF.h
>     llvm/trunk/test/DebugInfo/dwarfdump-invalid.test
>
> Modified: llvm/trunk/include/llvm/Object/ELF.h
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Object/ELF.h?rev=239125&r1=239124&r2=239125&view=diff
>
> ==============================================================================
> --- llvm/trunk/include/llvm/Object/ELF.h (original)
> +++ llvm/trunk/include/llvm/Object/ELF.h Thu Jun  4 18:58:31 2015
> @@ -928,7 +928,7 @@ ErrorOr<StringRef> ELFFile<ELFT>::getSym
>  template <class ELFT>
>  ErrorOr<StringRef>
>  ELFFile<ELFT>::getSectionName(const Elf_Shdr *Section) const {
> -  if (!dot_shstrtab_sec || Section->sh_name >= dot_shstrtab_sec->sh_size)
> +  if (Section->sh_name >= dot_shstrtab_sec->sh_size)
>      return object_error::parse_failed;
>    return StringRef(getString(dot_shstrtab_sec, Section->sh_name));
>  }
>
> Removed: llvm/trunk/test/DebugInfo/Inputs/invalid.elf.no-shstrtab
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/Inputs/invalid.elf.no-shstrtab?rev=239124&view=auto
>
> ==============================================================================
> Binary files llvm/trunk/test/DebugInfo/Inputs/invalid.elf.no-shstrtab
> (original) and llvm/trunk/test/DebugInfo/Inputs/invalid.elf.no-shstrtab
> (removed) differ
>
> Modified: llvm/trunk/test/DebugInfo/dwarfdump-invalid.test
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/dwarfdump-invalid.test?rev=239125&r1=239124&r2=239125&view=diff
>
> ==============================================================================
> --- llvm/trunk/test/DebugInfo/dwarfdump-invalid.test (original)
> +++ llvm/trunk/test/DebugInfo/dwarfdump-invalid.test Thu Jun  4 18:58:31
> 2015
> @@ -4,6 +4,3 @@ RUN: llvm-dwarfdump %p/Inputs/invalid.el
>  RUN: llvm-dwarfdump %p/Inputs/invalid.elf.2 2>&1 | FileCheck %s
> --check-prefix=INVALID-ELF
>  RUN: llvm-dwarfdump %p/Inputs/invalid.elf.3 2>&1 | FileCheck %s
> --check-prefix=INVALID-ELF
>  INVALID-ELF: Invalid data was encountered while parsing the file
> -
> -RUN: llvm-dwarfdump %p/Inputs/invalid.elf.no-shstrtab 2>&1 | FileCheck %s
> --check-prefix=EMPTY
> -EMPTY: .debug_info contents:
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150605/af83b58e/attachment.html>


More information about the llvm-commits mailing list