Bug 983941 - eu-addr2line exits with return code 1 if it gets stderr|stdout as parameter
eu-addr2line exits with return code 1 if it gets stderr|stdout as parameter
Status: CLOSED WONTFIX
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: elfutils (Show other bugs)
5.10
All Linux
unspecified Severity low
: rc
: ---
Assigned To: Petr Machata
qe-baseos-tools
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-12 07:03 EDT by Dagmar Prokopová
Modified: 2015-05-04 21:38 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-08-19 10:35:59 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Dagmar Prokopová 2013-07-12 07:03:06 EDT
Description of problem:
When there is stderr, stdout or any other nonnumeric literal set as the parameter for eu-addr2line it exits with return code 1 without any other complaint or additional explanation. If addr2line from binutils is used instead, it shows ??:0 as the output and exits with code 0.

On rhel6 and higher eu-addr2line works fine (??:0 as the output and exit code 0 for stderr|stdout and warning 'eu-addr2line: cannot find symbol...' for any other nonnumeric string).

If this behaviour is intended on rhel5, it would be IMHO nice to provide at least a message like 'eu-addr2line: cannot find symbol 'stderr''.

Version-Release number of selected component (if applicable):
elfutils-0.137-3.el5

How reproducible:
always

Steps to Reproduce:

$ cat reproducer.c
#include <stdio.h>
int main()
{
    printf("hallo universe\n");
    return 0;
}

$ gcc -g reproducer.c
$ eu-addr2line -e a.out stderr
$ echo $?
1


Actual results:
$ eu-addr2line -e a.out stderr
$ echo $?
1

Expected results:
$ eu-addr2line -e a.out stderr
??:0
$ echo $?
0


Additional info:
If I set any hexadecimal address as a parameter it works all right:

$ eu-addr2line -e a.out 0x400550
??:0
$ echo $?
0

The problem is only with stderr|stdout|any_other_nonnumeric_literal.
Comment 1 Mark Wielaard 2013-08-09 19:37:28 EDT
elfutils-0.137 doesn't handle eu-addr2line for "SYMBOL" (reliably), for that it needs at least this upstream patch:

commit 12e3d1f733cdb590a379a761ee092487931b8109
Author: Roland McGrath <roland@redhat.com>
Date:   Wed May 19 18:03:31 2010 -0700

    addr2line: Handle SYMBOL without +OFFSET.

which was only introduced in elfutils 0.148.

There might be other backport patches needed to make your use case work.

rhel-6 contains elfutils 0.152.
Comment 2 Mark Wielaard 2013-08-10 07:49:51 EDT
BTW. There is elfutils (0.154) for DTS (Developer Tool Set) which is available for RHEL5 x86_64 and i686.
Comment 3 mbenitez 2013-08-19 10:35:59 EDT
Developer recommendation is to use elfutils from DTS.
RHEL 5.10 is not taking further updates at this time.

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