Bug 5871

Summary: strings produces "out of memory" error on certain input
Product: Sisyphus Reporter: Mikhail Zabaluev <mhz>
Component: binutilsAssignee: Gleb F-Malinovskiy <glebfm>
Status: CLOSED FIXED QA Contact: qa-sisyphus
Severity: major    
Priority: P2 CC: glebfm
Version: unstable   
Hardware: all   
OS: Linux   
Attachments:
Description Flags
The file causing an error
none
Another sample file with large section size none

Description Mikhail Zabaluev 2005-01-13 03:26:35 MSK
When run on a certain file (see attachment), strings exits with an error:
strings: out of memory allocating 1365836033 bytes after a total of 0 bytes
Comment 1 Mikhail Zabaluev 2005-01-13 03:27:52 MSK
Created attachment 689 [details]
The file causing an error
Comment 2 Dmitry V. Levin 2005-01-14 20:43:52 MSK
I wonder whether it is a bug or not, since
strings --target=binary passes this test.
Comment 3 Dmitry V. Levin 2005-01-15 03:08:09 MSK
Created attachment 693 [details]
Another sample file with large section size

Specially crafted sample file with enormously large section size.
Comment 4 Mikhail Zabaluev 2005-01-15 11:46:55 MSK
The first file isn't an ELF file at all, it is a binary state dump produced by
Eclipse.

I think it's still a problem. The utility should fall back to --target=binary
mode if sanity checks on the object format fail.
Comment 5 Dmitry V. Levin 2005-03-17 15:37:48 MSK
No, this utility should not fall back to --target=binary.
The OOM handling fixed in binutils-2.15.94.0.2-alt3.