1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-22 04:22:57 +02:00
llvm-mirror/include/llvm/Object
George Rimar 64f5482e1d [Object/ELF] - Check index argument in getSymbol().
Without this check LLD crashes when SHT_GROUP section has invalid symbol index
because of next code:

template <class ELFT>
StringRef elf::ObjectFile<ELFT>::getShtGroupSignature(const Elf_Shdr &Sec) {
..
  const Elf_Sym *Sym = Obj.getSymbol(Symtab, Sec.sh_info);
..
}
If sh_info is too large, &Symbols[Index] just asserts.

No testcases provided because llvm-objdump/llvm-readelf does 
not use getSymbol() function.

I`ll commit testcase for LLD separatelly.

Differential revision: https://reviews.llvm.org/D25516

llvm-svn: 284702
2016-10-20 08:03:10 +00:00
..
Archive.h [Object] Fix a crash in Archive::child_iterator's default constructor. 2016-10-05 21:20:00 +00:00
ArchiveWriter.h Add move constructor and move assignment to fix MSVC build. 2016-06-29 23:54:10 +00:00
Binary.h Thread Expected<...> up from createMachOObjectFile() to allow llvm-objdump to produce a real error message 2016-04-06 22:14:09 +00:00
COFF.h [COFFObjectFile] Ignore broken symbol table 2016-08-30 20:20:24 +00:00
COFFImportFile.h Object: Fix COFF import file's symbols. 2015-09-01 06:01:53 +00:00
ELF.h [Object/ELF] - Check index argument in getSymbol(). 2016-10-20 08:03:10 +00:00
ELFObjectFile.h Refactor to use getSectionContentsAsArray. 2016-10-06 14:47:04 +00:00
ELFTypes.h Add a reference for Elf_Chdr type. 2016-07-07 20:19:19 +00:00
Error.h [Object] Move isNotObjectErrorInvalidFileType out of header. 2016-05-17 21:38:53 +00:00
IRObjectFile.h function_refify. NFC. 2016-07-01 11:05:15 +00:00
MachO.h Thread Expected<...> up from libObject’s getSymbolAddress() for symbols to allow 2016-06-24 18:24:42 +00:00
MachOUniversal.h Finish cleaning up most of the error handling in libObject’s MachOUniversalBinary 2016-06-28 23:16:13 +00:00
ModuleSummaryIndexObjectFile.h Apply another batch of fixes from clang-tidy's performance-unnecessary-value-param. 2016-06-17 20:41:14 +00:00
ObjectFile.h Thread Expected<...> up from libObject’s getSymbolAddress() for symbols to allow 2016-06-24 18:24:42 +00:00
RelocVisitor.h llvm-objdump: Add Hexagon printer changes for -S/-l options 2016-08-18 21:50:13 +00:00
StackMapParser.h [Stackmap] Added callsite counts to emitted function information. 2016-09-14 20:22:03 +00:00
SymbolicFile.h Apply clang-tidy's misc-move-constructor-init throughout LLVM. 2016-05-27 14:27:24 +00:00
SymbolSize.h Make computeSymbolSizes never fail. 2015-06-24 19:57:32 +00:00