[llvm] r239125 - Revert "[Object, ELF] Fix segmentation fault in ELFFile::getSectionName()."
Alexey Samsonov
vonosmas at gmail.com
Thu Jun 4 16:58:31 PDT 2015
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:
More information about the llvm-commits
mailing list