bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug binutils/5535] New: [bfd] vms-alpha segvs, in vms_close_and_cleanup


From: darkjames at darkjames dot ath dot cx
Subject: [Bug binutils/5535] New: [bfd] vms-alpha segvs, in vms_close_and_cleanup() when we try to load invalid file using it.
Date: 2 Jan 2008 21:08:01 -0000

objdump example:
$v+
binutils/objdump -a -b vms-alpha ./testfile
binutils/.libs/objdump: ./testfile: File format not recognized
Segmentation fault
$v-

(the easiest testfile is some text file)

backtrace:
#0  0x00002b9c3e820540 in vms_close_and_cleanup (abfd=0x7c0ff0) at vms.c:434
#1  0x00002b9c3e573d91 in bfd_close (abfd=0x7c0ff0) at opncls.c:657

(gdb) print abfd->xvec->name
$5 = 0x2b9c3e8859c9 "vms-alpha"
(gdb) print abfd->tdata.any
$6 = (void *) 0x0
(gdb) print abfd->format
$7 = bfd_unknown

the easiest fixup IMO is in vms_close_and_cleanup() add check:
if (abfd->tdata.any == NULL) return TRUE;

I think we could also patch bfd_close() to check
if (bfd_get_format(abfd) == bfd_unknown) return TRUE;

-- 
           Summary: [bfd] vms-alpha segvs, in vms_close_and_cleanup() when
                    we try to load invalid file using it.
           Product: binutils
           Version: unspecified
            Status: NEW
          Severity: minor
          Priority: P2
         Component: binutils
        AssignedTo: unassigned at sources dot redhat dot com
        ReportedBy: darkjames at darkjames dot ath dot cx
                CC: bug-binutils at gnu dot org
 GCC build triplet: --enable-targets=all
  GCC host triplet: x86_64-pc-linux-gnu
GCC target triplet: x86_64-pc-linux-gnu


http://sourceware.org/bugzilla/show_bug.cgi?id=5535

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]