This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug driver/63726] New: -Xlinker --threads cause random crash on gcc 4.9.2
- From: "dushistov at mail dot ru" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 03 Nov 2014 20:11:47 +0000
- Subject: [Bug driver/63726] New: -Xlinker --threads cause random crash on gcc 4.9.2
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63726
Bug ID: 63726
Summary: -Xlinker --threads cause random crash on gcc 4.9.2
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: driver
Assignee: unassigned at gcc dot gnu.org
Reporter: dushistov at mail dot ru
With such simple program:
$ cat /tmp/test2.cpp
#include <cstdio>
#include <vector>
int main()
{
std::vector<int> v = {1, 2};
for (auto a : v)
printf("%d\n", a);
return 0;
}
I get:
for i in `seq 1 10`; do g++ -std=c++11 -fuse-ld=gold -Xlinker --threads
test2.cpp; done
collect2: error: ld terminated with signal 11 [Segmentation fault]
*** Error in
`/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.2/../../../../x86_64-pc-linux-gnu/bin/ld.gold':
double free or corruption (fasttop): 0x00007fa66c000d10 ***
collect2: error: ld terminated with signal 11 [Segmentation fault]
/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.2/../../../../x86_64-pc-linux-gnu/bin/ld.gold:
fatal error: /usr/lib/gcc/x86_64-pc-linux-gnu/4.9.2/crtend.o: file too short
collect2: error: ld returned 1 exit status
collect2: error: ld terminated with signal 11 [Segmentation fault]
collect2: error: ld terminated with signal 11 [Segmentation fault]
*** Error in
`/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.2/../../../../x86_64-pc-linux-gnu/bin/ld.gold':
double free or corruption (fasttop): 0x0000000000a50df0 ***
out of memory allocating 47278999994368 bytes after a total of
18446604027574911016 bytes
collect2: error: ld returned 1 exit status
collect2: error: ld terminated with signal 11 [Segmentation fault]
While with gcc 4.8.3 all works fine:
$ for i in `seq 1 10`; do g++ -std=c++11 -fuse-ld=gold -Xlinker --threads
test2.cpp; done
$