aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
diff options
context:
space:
mode:
authorGeorge Rimar <grimar@accesssoftek.com>2016-10-20 08:03:10 +0000
committerGeorge Rimar <grimar@accesssoftek.com>2016-10-20 08:03:10 +0000
commitde69e9f5db82d93b5ad901501c95227e77da024b (patch)
tree4417e6cec24c363593840ee9ef2e88f24034b460 /llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
parente38da03f589901b08c800633e3077af528a9d4d8 (diff)
downloadllvm-de69e9f5db82d93b5ad901501c95227e77da024b.zip
llvm-de69e9f5db82d93b5ad901501c95227e77da024b.tar.gz
llvm-de69e9f5db82d93b5ad901501c95227e77da024b.tar.bz2
[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
Diffstat (limited to 'llvm/lib/Bitcode/Writer/BitcodeWriter.cpp')
0 files changed, 0 insertions, 0 deletions