[all-commits] [llvm/llvm-project] 109920: [symbolizer] Check existence of input file in GNU ...

Serge Pavlov via All-commits all-commits at lists.llvm.org
Fri Jun 23 03:21:24 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 1099208b991ee2ff2d0c0667fdd668702523a4cc
      https://github.com/llvm/llvm-project/commit/1099208b991ee2ff2d0c0667fdd668702523a4cc
  Author: Serge Pavlov <sepavloff at gmail.com>
  Date:   2023-06-23 (Fri, 23 Jun 2023)

  Changed paths:
    M llvm/include/llvm/DebugInfo/Symbolize/Symbolize.h
    M llvm/lib/DebugInfo/Symbolize/Symbolize.cpp
    A llvm/test/tools/llvm-symbolizer/errors.test
    M llvm/test/tools/llvm-symbolizer/input-base.test
    M llvm/tools/llvm-symbolizer/llvm-symbolizer.cpp

  Log Message:
  -----------
  [symbolizer] Check existence of input file in GNU mode

GNU addr2line exits immediately if it cannot open the file specified as
executable/relocatable. In contrast llvm-addr2line does not exit and, if
addresses are not specified in command line, waits for input on stdin. This
causes the test compiler-rt/test/asan/TestCases/Posix/asan-symbolize-bad-path.cc to block
forever on Gentoo (see https://reviews.llvm.org/rG27c4777f41d2ab204c1cf84ff1cccd5ba41354da#1190273).
To fix this issue the behavior llvm-addr2line now exits if
executable/relocatable file cannot be found.

It fixes https://github.com/llvm/llvm-project/issues/42099 (llvm-addr2line
does not exit when passed a non-existent file).

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




More information about the All-commits mailing list