https://sourceware.org/bugzilla/show_bug.cgi?id=23715
Bug ID: 23715
Summary: addr2line reports null symbol for inline frame
Product: binutils
Version: unspecified
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: binutils
Assignee: unassigned at sourceware dot org
Reporter: mail at milianw dot de
Target Milestone: ---
Since some time addr2line, and libbfd as used by perf, fail to associate the
symbol name to inlined frames. Note the "??" in the output of addr2line in the
reproducer below:
$ 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);
}
$ g++ -g -O2 test.cpp
$ addr2line -e a.out 766 -if
main
/usr/include/c++/8.2.1/bits/random.tcc:123
??
/usr/include/c++/8.2.1/bits/random.h:257
main
/tmp/test.cpp:11
I'm using libbfd 2.31.1 with gcc 8.2.1 or clang 6.0.1 currently. eu-addr2line
seems to work correctly, which makes me believe it's an issue with libbfd /
addr2line from binutils:
$ eu-addr2line -e a.out 766 -if
_ZNSt26linear_congruential_engineImLm16807ELm0ELm2147483647EE4seedEm inlined at
/usr/include/c++/8.2.1/bits/random.h:257:9 in main
/usr/include/c++/8.2.1/bits/random.tcc:123:2
_ZNSt26linear_congruential_engineImLm16807ELm0ELm2147483647EEC4Em
/usr/include/c++/8.2.1/bits/random.h:257:9
main
/tmp/test.cpp:11:27
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
bug-binutils mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-binutils