[llvm-bugs] [Bug 36742] New: SEGV in llvm-readobj -unwind on X86-64 COFF binary

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Mar 14 11:51:59 PDT 2018


https://bugs.llvm.org/show_bug.cgi?id=36742

            Bug ID: 36742
           Summary: SEGV in llvm-readobj -unwind on X86-64 COFF binary
           Product: new-bugs
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: w.parker.thompson at gmail.com
                CC: llvm-bugs at lists.llvm.org

Created attachment 20064
  --> https://bugs.llvm.org/attachment.cgi?id=20064&action=edit
Reproduction binary

When parsing the unwinding information in a x86-64 COFF binary (attached)
llvm-readobj segfaults.

Reproduction:
llvm-readobj -unwind ./msvs_whatever_64_O1_psftp_stripped

bt:
Format: COFF-x86-64
Arch: x86_64
AddressSize: 64bit
UnwindInformation [
  RuntimeFunction {
    StartAddress:  (0x0)
    EndAddress:  (0x4)
    UnwindInfoAddress:  (0x8)
#0 0x000055992cc2f6b9 llvm::sys::PrintStackTrace(llvm::raw_ostream&)
(./bin/llvm-readobj+0x1d46b9)
#1 0x000055992cc2da06 llvm::sys::RunSignalHandlers()
(./bin/llvm-readobj+0x1d2a06)
#2 0x000055992cc2db5c SignalHandler(int) (./bin/llvm-readobj+0x1d2b5c)
#3 0x00007fc4bb7f9da0 __restore_rt (/usr/lib/libpthread.so.0+0x11da0)
#4 0x000055992cbace25
llvm::object::COFFObjectFile::getSectionContents(llvm::object::coff_section
const*, llvm::ArrayRef<unsigned char>&) const (./bin/llvm-readobj+0x151e25)
#5 0x000055992cb5dbbb
llvm::Win64EH::Dumper::printRuntimeFunction(llvm::Win64EH::Dumper::Context
const&, llvm::object::coff_section const*, unsigned long,
llvm::Win64EH::RuntimeFunction const&) (./bin/llvm-readobj+0x102bbb)
#6 0x000055992cb5e1d9
llvm::Win64EH::Dumper::printData(llvm::Win64EH::Dumper::Context const&)
(./bin/llvm-readobj+0x1031d9)
#7 0x000055992cad0201 (anonymous namespace)::COFFDumper::printUnwindInfo()
(./bin/llvm-readobj+0x75201)
#8 0x000055992cb48f7e dumpObject(llvm::object::ObjectFile const*,
llvm::ScopedPrinter&) (./bin/llvm-readobj+0xedf7e)
#9 0x000055992caaa5d8 main (./bin/llvm-readobj+0x4f5d8)
#10 0x00007fc4ba317f4a __libc_start_main (/usr/lib/libc.so.6+0x20f4a)
#11 0x000055992cac157a _start (./bin/llvm-readobj+0x6657a)
Stack dump:
0.      Program arguments: ./bin/llvm-readobj -unwind
msvs_whatever_64_O1_psftp_stripped 
[1]    26476 segmentation fault (core dumped)  ./bin/llvm-readobj -unwind

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20180314/eac6f7ad/attachment-0001.html>


More information about the llvm-bugs mailing list