Bug 1684568 - addr2line reports null symbol for inline frame
Summary: addr2line reports null symbol for inline frame
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Developer Toolset
Classification: Red Hat
Component: binutils
Version: DTS 8.0 RHEL 7
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: alpha
: 8.1
Assignee: Nick Clifton
QA Contact: Martin Cermak
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-03-01 14:47 UTC by Piyush Bhoot
Modified: 2019-06-11 10:23 UTC (History)
7 users (show)

Fixed In Version: binutils-2.30-50.el7
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-06-11 10:23:50 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2019:1451 0 None None None 2019-06-11 10:23:54 UTC

Description Piyush Bhoot 2019-03-01 14:47:37 UTC
Description of problem:
addr2line reports null symbol for inline frame

Version-Release number of selected component (if applicable):
devtoolset-8-binutils-2.30-47.el7.x86_64

How reproducible:
Always

Steps to Reproduce:
#cat test.cpp 
#include <cmath>
#include <complex>
#include <iostream>
#include <random>

using namespace std;

int main()
{
    uniform_real_distribution<double> uniform(-1E5, 1E5);
    default_random_engine engine;
    double s = 0;
    for (int i = 0; i < 10000000; ++i) {
        s += norm(complex<double>(uniform(engine), uniform(engine)));
    }
    return static_cast<int>(s);
}

#addr2line -e a.out 766 -if

Actual results:

??
??:0

Additional info:

#eu-addr2line -e a.out 766 -if
??
??:0

---

Upstream bug
https://sourceware.org/bugzilla/show_bug.cgi?id=23715

Comment 2 Nick Clifton 2019-03-05 16:56:57 UTC
Fixed in:  binutils-2.30-50.el7

Comment 4 Martin Cermak 2019-03-14 15:01:01 UTC
(In reply to Piyush Bhoot from comment #0)
> #addr2line -e a.out 766 -if

As Nick kindly suggested, the address 766 might not be a valid address in the a.out binary.  We find a valid one, e.g.:

=======
 7.6 Server x86_64 # readelf -wL a.out | fgrep complex
/opt/rh/devtoolset-8/root/usr/include/c++/8/complex:
complex                                     1362            0x40064a
complex                                      610            0x40064a       1
/opt/rh/devtoolset-8/root/usr/include/c++/8/complex:
complex                                      610            0x400668
complex                                      676            0x400675
 7.6 Server x86_64 # 
=======

Then we can reproduce:

=======
 7.6 Server x86_64 # rpm -q devtoolset-8-binutils
devtoolset-8-binutils-2.30-47.el7.x86_64
 7.6 Server x86_64 # which addr2line
/opt/rh/devtoolset-8/root/usr/bin/addr2line
 7.6 Server x86_64 # /opt/rh/devtoolset-8/root/usr/bin/addr2line -e a.out 0x40064a -if
main
/opt/rh/devtoolset-8/root/usr/include/c++/8/bits/random.h:1823
??
/opt/rh/devtoolset-8/root/usr/include/c++/8/bits/random.h:1814
main
/root/test.cpp:14
 7.6 Server x86_64 #
=======

and verify:

=======
 7.6 Server x86_64 # rpm -q devtoolset-8-binutils
devtoolset-8-binutils-2.30-52.el7.x86_64
 7.6 Server x86_64 # which addr2line
/opt/rh/devtoolset-8/root/usr/bin/addr2line
 7.6 Server x86_64 # /opt/rh/devtoolset-8/root/usr/bin/addr2line -e a.out 0x40064a -if
_ZNSt25uniform_real_distributionIdEclISt26linear_congruential_engineImLm16807ELm0ELm2147483647EEEEdRT_RKNS0_10param_typeE
/opt/rh/devtoolset-8/root/usr/include/c++/8/bits/random.h:1823
_ZNSt25uniform_real_distributionIdEclISt26linear_congruential_engineImLm16807ELm0ELm2147483647EEEEdRT_
/opt/rh/devtoolset-8/root/usr/include/c++/8/bits/random.h:1814
main
/root/test.cpp:14
 7.6 Server x86_64 #
=======

Verified similarly on all other supported arches with devtoolset-8-binutils-2.30-52.el{6,7}.

Comment 6 errata-xmlrpc 2019-06-11 10:23:50 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2019:1451


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