group.of.nepali.translators team mailing list archive
-
group.of.nepali.translators team
-
Mailing list archive
-
Message #06768
[Bug 1608898] Re: ld crash generating map file for c++11 auto return type inference
this seems to work in yakkety. in xenial I get a segfault, but i can't
see the memory hog.
** Also affects: binutils (Ubuntu Xenial)
Importance: Undecided
Status: New
** Changed in: binutils (Ubuntu)
Status: New => Fix Released
--
You received this bug notification because you are a member of नेपाली
भाषा समायोजकहरुको समूह, which is subscribed to Xenial.
Matching subscriptions: Ubuntu 16.04 Bugs
https://bugs.launchpad.net/bugs/1608898
Title:
ld crash generating map file for c++11 auto return type inference
Status in binutils package in Ubuntu:
Fix Released
Status in binutils source package in Xenial:
New
Bug description:
I'm getting a crash in ld while linking C++-11 auto return type code.
ld starts madly allocating memory until your memory and swap are
filled, then seg-faults. Use ulimit to avoid swap thrashing while
reproducing:
$ ulimit -v 2147483648 # 2GB
$ g++ -Wall -ggdb -O0 --std=c++11 -Werror -Wl,-Map=_timing.map _timing_ld_crash_map.cpp -o _timing
collect2: fatal error: ld terminated with signal 11 [Segmentation fault], core dumped
compilation terminated.
I've reduced the input source which is attached as
_timing_ld_crash_map.cpp.
The following changes (on their own) make the problem "go away":
1. remove -Wl,-Map=...map from the command-line
2. stepping up to -O1 or higher. -Og fails must like -O0.
3. Making `runTest` `static`
It seems likely the compiler is emitting a symbol or symbols causing
binutils to choke during mapfile generation. Its possible the
compiler could be partly at fault, but clearly ld shouldn't max out
the memory.
Wrapping the body (not the #includes) in #pragma optimisation for -O3
doesn't fix things so likely the std library symbols in <vector> are
part of the problem.
$ lsb_release -rd
Description: Ubuntu 16.04 LTS
Release: 16.04
$ apt-cache policy binutils gcc g++
binutils:
Installed: 2.26.1-1ubuntu1~16.04.1
Candidate: 2.26.1-1ubuntu1~16.04.1
Version table:
*** 2.26.1-1ubuntu1~16.04.1 500
500 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages
100 /var/lib/dpkg/status
2.26-8ubuntu2 500
500 http://archive.ubuntu.com/ubuntu xenial/main amd64 Packages
gcc:
Installed: 4:5.3.1-1ubuntu1
Candidate: 4:5.3.1-1ubuntu1
Version table:
*** 4:5.3.1-1ubuntu1 500
500 http://archive.ubuntu.com/ubuntu xenial/main amd64 Packages
100 /var/lib/dpkg/status
g++:
Installed: 4:5.3.1-1ubuntu1
Candidate: 4:5.3.1-1ubuntu1
Version table:
*** 4:5.3.1-1ubuntu1 500
500 http://archive.ubuntu.com/ubuntu xenial/main amd64 Packages
100 /var/lib/dpkg/status
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/binutils/+bug/1608898/+subscriptions