Bug 1990817 - readelf returns 0 when attempting to read a non-existent file
Summary: readelf returns 0 when attempting to read a non-existent file
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: binutils
Version: 35
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Nick Clifton
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-08-06 10:26 UTC by Václav Kadlčík
Modified: 2022-11-29 17:18 UTC (History)
8 users (show)

Fixed In Version: binutils-2.37-6.fc35
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-11-29 17:18:30 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
RPMs present (18.14 KB, text/plain)
2021-08-06 10:26 UTC, Václav Kadlčík
no flags Details

Description Václav Kadlčík 2021-08-06 10:26:27 UTC
Created attachment 1811415 [details]
RPMs present

Description of problem:

readelf -Wl /NON_EXISTENT; echo $?
readelf: /NON_EXISTENT: Error: No such file
0


Version-Release number of selected component (if applicable):

binutils-2.37-3.fc35.x86_64


Additional info:

FWIW:

 * binutils-2.36.1-15.fc35.x86_64.rpm works as expected

 * binutils-2.37-1.fc35.x86_64.rpm is the first broken build

 * On my Fedora 33 notebook, I checked out and built vanilla
   upstream binutils-2_37 (commit
   116a737f438d03a1bd6aa706b6ea0b4022f3b7e2) and it works
   as expected.


Credits:

Martin Liška

Comment 1 Jonathan Wakely 2021-08-06 10:46:20 UTC
Possibly related to this local patch:
https://src.fedoraproject.org/rpms/binutils/blob/rawhide/f/binutils-filename-in-error-messages.patch

Comment 2 Jonathan Wakely 2021-08-06 10:49:30 UTC
This rebase altered the patch so that the initial value of ret changed from FALSE to true:

https://src.fedoraproject.org/rpms/binutils/c/90f5896dacd7e6740f1128f12ef637f4c7634af7

Comment 3 Jonathan Wakely 2021-08-06 11:16:32 UTC
Pull request to fix it:
https://src.fedoraproject.org/rpms/binutils/pull-request/26

Comment 4 Ben Cotton 2021-08-10 13:36:00 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 35 development cycle.
Changing version to 35.

Comment 5 Nick Clifton 2021-08-11 14:56:58 UTC
Fixed in binutils-2.37-5.fc35.
Note: The Fixed-In field has been set to binutils-2.37-6.fc35 as there has been another minor update in the interim.

Comment 6 Ben Cotton 2022-11-29 17:03:01 UTC
This message is a reminder that Fedora Linux 35 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora Linux 35 on 2022-12-13.
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 EOL if it remains open with a
'version' of '35'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, change the 'version' 
to a later Fedora Linux version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora Linux 35 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 Linux, you are encouraged to change the 'version' to a later version
prior to this bug being closed.


Note You need to log in before you can comment on or make changes to this bug.