https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97227

            Bug ID: 97227
           Summary: dsymutil runs on ELF execs during libbacktrace testing
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: trivial
          Priority: P3
         Component: libbacktrace
          Assignee: unassigned at gcc dot gnu.org
          Reporter: vries at gcc dot gnu.org
                CC: ian at gcc dot gnu.org
  Target Milestone: ---

When running libbacktrace check, I run into:
...
make[3]: Entering directory
'/dev/shm/tdevries/data/master/2020-09-24T22-37-10-02-00-942ab9e9d4f/build/libbacktrace'
dsymutil btest
Stack dump:
0.      Program arguments: dsymutil btest
#0 0x00007fc89542fd7d llvm::sys::PrintStackTrace(llvm::raw_ostream&)
(/usr/bin/../lib64/libLLVM.so.10+0x9a9d7d)
#1 0x00007fc89542d6a0 llvm::sys::RunSignalHandlers()
(/usr/bin/../lib64/libLLVM.so.10+0x9a76a0)
#2 0x00007fc895430412 (/usr/bin/../lib64/libLLVM.so.10+0x9aa412)
#3 0x00007fc8943295a0 __restore_rt (/lib64/libc.so.6+0x395a0)
#4 0x0000000000410085 _init (/usr/bin/dsymutil-10.0.0+0x410085)
#5 0x00007fc89431434a __libc_start_main (/lib64/libc.so.6+0x2434a)
#6 0x000000000040d69a _init (/usr/bin/dsymutil-10.0.0+0x40d69a)
make[3]: *** [Makefile:2396: btest.dSYM] Segmentation fault (core dumped)
...

The installed dsymutil is from llvm10, which has a bug which is fixed on llvm
trunk by this commit:
...
commit ef87f69ec538ccfe7d68b6d03125e7636e859ace (HEAD)
Author: Greg Clayton <gclay...@fb.com>
Date:   Fri Mar 6 14:59:41 2020 -0800

    Fix a copy and paste error that would cause a crash.
...

Anyway, after applying that commit we'll be likely to get:
...
dsymutil btest
error: cannot parse the debug map for 'btest': The file was not recognized as a
valid object file
...
because this tool is intended for mach-o, not for elf.

So, probably we should only do dsymutil btest on a mach-o platform.

Reply via email to