[all-commits] [llvm/llvm-project] 065400: [llvm-readobj] - Don't crash when dumping invalid ...

Georgii Rymar via All-commits all-commits at lists.llvm.org
Fri Jan 31 02:21:07 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 0654005ab2782a1294158ecfddd1337d8be7e3a4
      https://github.com/llvm/llvm-project/commit/0654005ab2782a1294158ecfddd1337d8be7e3a4
  Author: Georgii Rymar <grimar at accesssoftek.com>
  Date:   2020-01-31 (Fri, 31 Jan 2020)

  Changed paths:
    M llvm/test/tools/llvm-readobj/ELF/broken-dynamic-reloc.test
    A llvm/test/tools/llvm-readobj/ELF/dynamic-reloc-no-section-headers.test
    M llvm/tools/llvm-readobj/ELFDumper.cpp

  Log Message:
  -----------
  [llvm-readobj] - Don't crash when dumping invalid dynamic relocation.

Currently when we dump dynamic relocation with use of
DT_RELA/DT_RELASZ/DT_RELAENT tags, we crash when a symbol index
is larger than the number of dynamic symbols or
when there is no dynamic symbol table.

This patch adds test cases and fixes the issues.

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




More information about the All-commits mailing list