Red Hat Bugzilla – Bug 66670
strings dumps core
Last modified: 2008-05-01 11:38:02 EDT
Description of problem:
I have couple binary files that causes strings to dump core when running
Doing "strings -a mybinary" seems to work.
Steps to Reproduce:
Actual Results: Segmentation fault (core dumped)
Expected Results: /lib/ld-linux.so.2
(and so on...)
broken version: binutils-126.96.36.199.2-11
works fine in: binutils-188.8.131.52.8-12
Here's gdb output of the problem.
"env.exe" is the binary I'm testing. Don't mind the funny name of it. ;)
env.exe: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically
linked (uses shared libs), stripped
GNU gdb Red Hat Linux (5.1.90CVS-5)
Copyright 2002 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 "i386-redhat-linux"...(no debugging symbols found)...
(gdb) run env.exe
Starting program: /usr/bin/strings env.exe
(no debugging symbols found)...(no debugging symbols found)...(no debugging
symbols found)...(no debugging symbols found)...
Program received signal SIGSEGV, Segmentation fault.
0x4005c888 in bfd_section_from_shdr () from /usr/lib/libbfd-184.108.40.206.2.so
#0 0x4005c888 in bfd_section_from_shdr () from /usr/lib/libbfd-220.127.116.11.2.so
#1 0x4004da07 in bfd_elf32_object_p () from /usr/lib/libbfd-18.104.22.168.2.so
#2 0x4003a1b7 in bfd_check_format_matches () from /usr/lib/libbfd-22.214.171.124.2.so
#3 0x40039ff5 in bfd_check_format () from /usr/lib/libbfd-126.96.36.199.2.so
#4 0x08049360 in strcpy ()
#5 0x080493da in strcpy ()
#6 0x08049245 in strcpy ()
#7 0x42017499 in __libc_start_main () from /lib/i686/libc.so.6
Can you attach your file 'env.exe'?
I can't attach it to public Bugzilla, but I can give it to someone directly for
Maybe, you can try to find a minimal sub-part of your exe file that makes
strings segfaults. Otherwise, for me: no testcase, no debug.
I have sent an URL of the binary to <firstname.lastname@example.org>.
He may decide if it is necessary to give it to others, but only with my permission.
ps. Try also gdb, it crashes also (no bugreport filed yet)
Note that perl2exe should probably be fixed to create section header table too.
Should be fixed in binutils-188.8.131.52.2-1.