[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug binutils/22555] New: readelf exit status is 0 for empty zero-length
From: |
mstahl at redhat dot com |
Subject: |
[Bug binutils/22555] New: readelf exit status is 0 for empty zero-length file |
Date: |
Wed, 06 Dec 2017 10:01:48 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=22555
Bug ID: 22555
Summary: readelf exit status is 0 for empty zero-length file
Product: binutils
Version: 2.29
Status: NEW
Severity: normal
Priority: P2
Component: binutils
Assignee: unassigned at sourceware dot org
Reporter: mstahl at redhat dot com
Target Milestone: ---
from Fedora 26 to Fedora 27, the readelf exit status changed from 1
to 0 when running "readelf -d" on an empty file:
old:
> touch /tmp/foo
> readelf -d /tmp/foo
readelf: /tmp/foo: Error: Failed to read file's magic number
> echo $?
1
> readelf --version
GNU readelf version 2.27-28.fc26
Copyright (C) 2016 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) any later version.
This program has absolutely no warranty.
new:
> touch /tmp/foo
> readelf -d /tmp/foo
readelf: /tmp/foo: Error: Failed to read file's magic number
> echo $?
0
> readelf --version
GNU readelf version 2.29-6.fc27
Copyright (C) 2017 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) any later version.
This program has absolutely no warranty.
but readelf still prints an error - so i think it should not exit with 0.
--
You are receiving this mail because:
You are on the CC list for the bug.
- [Bug binutils/22555] New: readelf exit status is 0 for empty zero-length file,
mstahl at redhat dot com <=