[all-commits] [llvm/llvm-project] c74751: [obj2yaml] - Fix the crash in getUniquedSectionNam...

Georgii Rymar via All-commits all-commits at lists.llvm.org
Mon Jan 11 04:09:24 PST 2021


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: c74751d4b5bd8e6753ba8dbc5baa88d7c8929c5c
      https://github.com/llvm/llvm-project/commit/c74751d4b5bd8e6753ba8dbc5baa88d7c8929c5c
  Author: Georgii Rymar <grimar at accesssoftek.com>
  Date:   2021-01-11 (Mon, 11 Jan 2021)

  Changed paths:
    M llvm/test/tools/obj2yaml/ELF/symbol.yaml
    M llvm/tools/obj2yaml/elf2yaml.cpp

  Log Message:
  -----------
  [obj2yaml] - Fix the crash in getUniquedSectionName().

`getUniquedSectionName(const Elf_Shdr *Sec)` assumes that
`Sec` is not `nullptr`.

I've found one place in `getUniquedSymbolName` where it is
not true (because of that we crash when trying to dump
unnamed null section symbols).

Patch fixes the crash and changes the signature of the
`getUniquedSectionName` section to accept a reference.

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




More information about the All-commits mailing list