Bug 66670

Summary: strings dumps core
Product: [Retired] Red Hat Linux Reporter: Toni Willberg <toniw>
Component: binutilsAssignee: Jakub Jelinek <jakub>
Status: CLOSED RAWHIDE QA Contact:
Severity: high Docs Contact:
Priority: medium    
Version: 7.3CC: olivier.baudron
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2002-06-18 09:13:20 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Toni Willberg 2002-06-13 13:51:40 UTC
Description of problem:
I have couple binary files that causes strings to dump core when running
"strings mybinary".

Doing "strings -a mybinary" seems to work.




How reproducible:
Always

Steps to Reproduce:
strings mybinary


Actual Results:  Segmentation fault (core dumped)


Expected Results:  /lib/ld-linux.so.2
qoH
q^
__gmon_start__
(and so on...)


Additional info:

broken version:  binutils-2.11.93.0.2-11
works fine in:   binutils-2.11.90.0.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

gdb strings
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-2.11.93.0.2.so
(gdb) bt
#0  0x4005c888 in bfd_section_from_shdr () from /usr/lib/libbfd-2.11.93.0.2.so
#1  0x4004da07 in bfd_elf32_object_p () from /usr/lib/libbfd-2.11.93.0.2.so
#2  0x4003a1b7 in bfd_check_format_matches () from /usr/lib/libbfd-2.11.93.0.2.so
#3  0x40039ff5 in bfd_check_format () from /usr/lib/libbfd-2.11.93.0.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
(gdb)

Comment 1 Olivier Baudron 2002-06-17 00:29:44 UTC
Can you attach your file 'env.exe'?

Comment 2 Toni Willberg 2002-06-17 05:33:08 UTC
I can't attach it to public Bugzilla, but I can give it to someone directly for
testing.



Comment 3 Olivier Baudron 2002-06-17 20:12:36 UTC
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.

Comment 4 Toni Willberg 2002-06-18 06:34:04 UTC
Hi.

I have sent an URL of the binary to <jakub>.

He may decide if it is necessary to give it to others, but only with my permission.

Thanks!

ps. Try also gdb, it crashes also (no bugreport filed yet)



Comment 5 Jakub Jelinek 2002-06-18 09:13:15 UTC
http://sources.redhat.com/ml/binutils/2002-06/msg00500.html

Note that perl2exe should probably be fixed to create section header table too.

Comment 6 Jakub Jelinek 2002-08-16 08:32:42 UTC
Should be fixed in binutils-2.13.90.0.2-1.