Bug 1005182

Summary: readelf does not flush stdout prior to emitting error messages, resulting in bad output
Product: [Fedora] Fedora Reporter: Denys Vlasenko <dvlasenk>
Component: binutilsAssignee: Nick Clifton <nickc>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 18CC: jakub, nickc
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-02-05 23:22:03 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Test coredump none

Description Denys Vlasenko 2013-09-06 11:32:13 UTC
Created attachment 794669 [details]
Test coredump

Description of problem:
readelf does not flush stdout prior to emitting error messages, resulting in bad output

Version-Release number of selected component (if applicable):
binutils-2.23.51.0.1-6.fc18.x86_64


Steps to Reproduce:
Run
    readelf -aW coredump >OUT 2>&1
on attached coredump.

Actual results:
This is a truncated coredump. so readelf discovers that it can't read some data, somewhere while it decodes the file.
The output saved in file OUT is:
"""
ELF Header:
...
Program Headers:
  Type           Offset   VirtAddr           PhysAddr           FileSiz  MemSiz   Flg Align
...
  LOAD           0x32b7000 0x00007f2615e57000 0x0000000000000000 0x001000 0x001000 R   0x1000
  LOAD           0x32b8000 0x00007f2615e58000 0x0000000000000000 0x001000 0x001000 RW  0x1000
  LOAD           0x32b9000 0x00007f2readelf: Error: Unable to read in 0x8398 bytes of notes
615e59000 0x0000000000000000 0x000000 0x002000 R   0x1000
  LOAD           0x32b9000 0x00007f2615e5b000 0x0000000000000000 0x000000 0x002000 R   0x1000
  LOAD           0x32b9000 0x00007f2615e5d000 0x0000000000000000 0x000000 0x001000 R   0x1000
...
"""

Expected results:
The "readelf: Error: Unable to read in 0x8398 bytes of notes" line must be an actual separate line.

Comment 1 Nick Clifton 2013-09-09 14:11:51 UTC
Fixed in:

binutils-2.23.51.0.1-11.fc18 
binutils-2.23.52.0.1-11.fc19

Comment 2 Nick Clifton 2013-09-09 15:18:21 UTC
And:

binutils-2.23.88.0.1-14.fc20
binutils-2.23.88.0.1-14.fc21

Cheers
  Nick

Comment 3 Fedora End Of Life 2013-12-21 15:48:11 UTC
This message is a reminder that Fedora 18 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 18. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '18'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 18's end of life.

Thank you for reporting this issue and we are sorry that we may not be 
able to fix it before Fedora 18 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior to Fedora 18's end of life.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 4 Fedora End Of Life 2014-02-05 23:22:03 UTC
Fedora 18 changed to end-of-life (EOL) status on 2014-01-14. Fedora 18 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.