[all-commits] [llvm/llvm-project] 4936d7: [llvm-objdump][test] Add verneed-invalid.test

Fangrui Song via All-commits all-commits at lists.llvm.org
Thu Sep 15 07:05:20 PDT 2022


  Branch: refs/heads/release/15.x
  Home:   https://github.com/llvm/llvm-project
  Commit: 4936d7ce485292b10a7d18a22fa06fcab8f899f6
      https://github.com/llvm/llvm-project/commit/4936d7ce485292b10a7d18a22fa06fcab8f899f6
  Author: Fangrui Song <i at maskray.me>
  Date:   2022-09-15 (Thu, 15 Sep 2022)

  Changed paths:
    A llvm/test/tools/llvm-objdump/ELF/verneed-invalid.test

  Log Message:
  -----------
  [llvm-objdump][test] Add verneed-invalid.test

(cherry picked from commit 55a72dae1f996e4fb1528c1b6b1bff8550fec303)


  Commit: 29d395a1b7a8176abb1d6278f7df98301fbe7744
      https://github.com/llvm/llvm-project/commit/29d395a1b7a8176abb1d6278f7df98301fbe7744
  Author: Fangrui Song <i at maskray.me>
  Date:   2022-09-15 (Thu, 15 Sep 2022)

  Changed paths:
    M llvm/include/llvm/Object/ELF.h
    M llvm/test/tools/llvm-objdump/ELF/verneed-invalid.test
    M llvm/test/tools/llvm-objdump/ELF/verneed.test
    M llvm/tools/llvm-objdump/ELFDump.cpp

  Log Message:
  -----------
  [llvm-objdump] Change printSymbolVersionDependency to use ELFFile API

When .gnu.version_r is empty (allowed by readelf but warned by objdump),
llvm-objdump -p may decode the next section as .gnu.version_r and may crash due
to out-of-bounds C string reference. ELFFile<ELFT>::getVersionDependencies
handles 0-entry .gnu.version_r gracefully. Just use it.

Fix https://github.com/llvm/llvm-project/issues/57707

Differential Revision: https://reviews.llvm.org/D133751

(cherry picked from commit 25394c9d10e73b666f4fa1dff2426824894cce58)


Compare: https://github.com/llvm/llvm-project/compare/99882208e234...29d395a1b7a8


More information about the All-commits mailing list