Hi misc@,

objdump gets segfault the dumping kernel.
Any ideas?

# gcc -v
Reading specs from /usr/lib/gcc-lib/amd64-unknown-openbsd5.2/4.2.1/specs
Target: amd64-unknown-openbsd5.2
Configured with: OpenBSD/amd64 system compiler
Thread model: posix
gcc version 4.2.1 20070719 

# ldd /usr/bin/objdump                                                          
                                                                                
                   
/usr/bin/objdump:
        Start            End              Type Open Ref GrpRef Name
        000004bc8dc00000 000004bc8e0cf000 exe  1    0   0      /usr/bin/objdump
        000004be97896000 000004be97cc1000 rlib 0    1   0      
/usr/lib/libiberty.so.10.1
        000004be9091c000 000004be90e04000 rlib 0    1   0      
/usr/lib/libc.so.66.0
        000004be99400000 000004be99400000 rtld 0    1   0      
/usr/libexec/ld.so

# gdb /usr/bin/objdump /objdump.core      
GNU gdb 6.3
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "amd64-unknown-openbsd5.2"...(no debugging symbols 
found)

Core was generated by `objdump'.
Program terminated with signal 11, Segmentation fault.
(no debugging symbols found)
Loaded symbols for /usr/bin/objdump
Reading symbols from /usr/lib/libiberty.so.10.1...done.
Loaded symbols for /usr/lib/libiberty.so.10.1
Reading symbols from /usr/lib/libc.so.66.0...done.
Loaded symbols for /usr/lib/libc.so.66.0
Reading symbols from /usr/libexec/ld.so...done.
Loaded symbols for /usr/libexec/ld.so
#0  0x00000c688c4ebff5 in strcpy (to=0xc66005a7869 <Address 0xc66005a7869 out 
of bounds>, from=0xc667e798ee0 " ") at /usr/src/lib/libc/string/strcpy.c:48
48              for (; (*to = *from) != '\0'; ++from, ++to);
(gdb) bt
#0  0x00000c688c4ebff5 in strcpy (to=0xc66005a7869 <Address 0xc66005a7869 out 
of bounds>, from=0xc667e798ee0 " ") at /usr/src/lib/libc/string/strcpy.c:48
#1  0x00000c667e644ae3 in oappend () from /usr/bin/objdump
#2  0x00000c667e647c4b in print_insn () from /usr/bin/objdump
#3  0x00000c667e626060 in disassemble_section () from /usr/bin/objdump
#4  0x00000c667e651f9c in bfd_map_over_sections () from /usr/bin/objdump
#5  0x00000c667e62468b in dump_bfd () from /usr/bin/objdump
#6  0x00000c667e624b2f in display_bfd () from /usr/bin/objdump
#7  0x00000c667e624c66 in display_file () from /usr/bin/objdump
#8  0x00000c667e625414 in main () from /usr/bin/objdump
(gdb) frame 0
#0  0x00000c688c4ebff5 in strcpy (to=0xc66005a7869 <Address 0xc66005a7869 out 
of bounds>, from=0xc667e798ee0 " ") at /usr/src/lib/libc/string/strcpy.c:48
48              for (; (*to = *from) != '\0'; ++from, ++to);
(gdb) list
43      char *
44      strcpy(char *to, const char *from)
45      {
46              char *save = to;
47      
48              for (; (*to = *from) != '\0'; ++from, ++to);
49              return(save);
50      }
(gdb) info locals
No locals.
(gdb) q
# 

//mxb

Reply via email to