[Bug lto/69408] LD crashes with LTO

2016-07-10 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69408

Andrew Pinski  changed:

   What|Removed |Added

 Status|WAITING |RESOLVED
 Resolution|--- |MOVED

--- Comment #16 from Andrew Pinski  ---
Move to redhat's bugzilla.

[Bug lto/69408] LD crashes with LTO

2016-01-27 Thread night_ghost at ykoctpa dot ru
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69408

--- Comment #15 from night_ghost at ykoctpa dot ru ---

steps to repeat:

Arduino recent version should be installed

GCC created by the above script should be in PATH and in Arduino's
/usr/share/arduino/hardware/tools/avr


un-tar testcase, cd to it.

in mk/board_avr.mk one should set path to liblto_plugin.so

then

cd ArduCopter
make

after lots of compilation you'll get

%% ArduCopter.elf
collect2: fatal error: ld terminated with signal 11 [Segmentation fault], core
dumped
compilation terminated.
make: *** [/tmp/ArduCopter.build/ArduCopter.elf] Ошибка 1
make: *** Удаляется файл `/tmp/ArduCopter.build/ArduCopter.elf'


PS. I can't upload testcase because of size limit 1mb. Is there another way to
send it?

[Bug lto/69408] LD crashes with LTO

2016-01-27 Thread night_ghost at ykoctpa dot ru
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69408

--- Comment #14 from night_ghost at ykoctpa dot ru ---
Created attachment 37487
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=37487&action=edit
script to build GCC-avr and other tools

use this script to build GCC

[Bug lto/69408] LD crashes with LTO

2016-01-26 Thread ubizjak at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69408

--- Comment #13 from Uroš Bizjak  ---
(In reply to Uroš Bizjak from comment #12)
> Created attachment 37478 [details]
> libgcov.a
> 
> At the end of the day, it looks like a ld.bfd bug.

I have taken this specific x86_64 problem to Red Hat Bugzilla [1], but I'm not
sure anymore if this is the same problem as reported by OP.

[1] https://bugzilla.redhat.com/show_bug.cgi?id=1302075

[Bug lto/69408] LD crashes with LTO

2016-01-26 Thread ubizjak at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69408

--- Comment #12 from Uroš Bizjak  ---
Created attachment 37478
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=37478&action=edit
libgcov.a

At the end of the day, it looks like a ld.bfd bug.

Starting program: /usr/bin/ld.bfd --eh-frame-hdr -m elf_x86_64 -dynamic-linker
/lib64/ld-linux-x86-64.so.2 -r 20100430-1_0.o libgcov.a

Program received signal SIGSEGV, Segmentation fault.
objalloc_free (o=0x0) at ./objalloc.c:181
181   l = (struct objalloc_chunk *) o->chunks;
(gdb) bt
#0  objalloc_free (o=0x0) at ./objalloc.c:181
#1  0x77b0129d in bfd_hash_table_free (table=table@entry=0x55831be0
) at hash.c:426
#2  0x55572559 in lang_finish () at ldlang.c:1274
#3  cmdline_emit_object_only_section () at ldlang.c:9004
#4  0xf583 in main (argc=9, argv=0x7fffdc58) at ./ldmain.c:487

[Bug lto/69408] LD crashes with LTO

2016-01-26 Thread ubizjak at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69408

--- Comment #11 from Uroš Bizjak  ---
Created attachment 37477
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=37477&action=edit
object file of the failing test

Maybe attached object file will help:

$ /ssd/uros/gcc-build/prev-gcc/collect2 -flto --eh-frame-hdr -m elf_x86_64
-dynamic-linker /lib64/ld-linux-x86-64.so.2 -r -L/ssd/uros/gcc-build/prev-gcc
20100430-1_0.o -lgcov
collect2: fatal error: ld terminated with signal 11 [Segmentation fault], core
dumped
compilation terminated.

[Bug lto/69408] LD crashes with LTO

2016-01-26 Thread ubizjak at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69408

--- Comment #10 from Uroš Bizjak  ---
(In reply to Martin Liška from comment #9)

> I'm not so lucky to reproduce the segfault. Are you running a current trunk
> revision? What version of ld do you have?

I have the latest (and fully updated) Fedora 23 with:

[uros@localhost lto]$ /ssd/uros/gcc-build/gcc/xgcc --version
xgcc (GCC) 6.0.0 20160124 (experimental) [trunk revision 232779]
Copyright (C) 2016 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

[uros@localhost lto]$ ld --version
GNU ld version 2.25-15.fc23
Copyright (C) 2014 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) a later version.
This program has absolutely no warranty.
[

[Bug lto/69408] LD crashes with LTO

2016-01-26 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69408

--- Comment #9 from Martin Liška  ---
(In reply to Uroš Bizjak from comment #8)
> The ld segfault can also be triggered outside testsuite with:
> 
> /ssd/uros/gcc-build/gcc/xgcc -B /ssd/uros/gcc-build/gcc -O2 -fprofile-arcs
> -flto -r -nostdlib -fno-use-linker-plugin 20100430-1_0.c 
> collect2: fatal error: ld terminated with signal 11 [Segmentation fault],
> core dumped
> compilation terminated.

Hi.

I'm not so lucky to reproduce the segfault. Are you running a current trunk
revision? What version of ld do you have?

gcc version: r232833
ld --version: GNU ld (GNU Binutils; openSUSE Factory) 2.25.0

Thanks,
Martin

[Bug lto/69408] LD crashes with LTO

2016-01-26 Thread ubizjak at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69408

--- Comment #8 from Uroš Bizjak  ---
The ld segfault can also be triggered outside testsuite with:

/ssd/uros/gcc-build/gcc/xgcc -B /ssd/uros/gcc-build/gcc -O2 -fprofile-arcs
-flto -r -nostdlib -fno-use-linker-plugin 20100430-1_0.c 
collect2: fatal error: ld terminated with signal 11 [Segmentation fault], core
dumped
compilation terminated.

[Bug lto/69408] LD crashes with LTO

2016-01-26 Thread ubizjak at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69408

--- Comment #7 from Uroš Bizjak  ---
Yes.

Using RUNTESTFLAGS="--target_board=unix/-fno-use-linker-plugin" on
x86_64-linux-gnu, I got:

UNRESOLVED: gcc.dg/lto/20100430-1 c_lto_20100430-1_0.o-c_lto_20100430-1_0.o
execute -O2 -fprofile-arcs -flto -r -nostdlib
FAIL: gcc.dg/lto/20100430-1 c_lto_20100430-1_0.o-c_lto_20100430-1_0.o link, -O2
-fprofile-arcs -flto -r -nostdlib


Executing on host: /ssd/uros/gcc-build/gcc/xgcc -B/ssd/uros/gcc-build/gcc/ 
-fno-use-linker-plugin-B/ssd/uros/gcc-build/x86_64-pc-linux-gnu/./libmpx/ 
-B/ssd/uros/gcc-build/x86_64-pc-linux-gnu/./libmpx/mpxrt 
-L/ssd/uros/gcc-build/x86_64-pc-linux-gnu/./libmpx/mpxrt/.libs 
-B/ssd/uros/gcc-build/x86_64-pc-linux-gnu/./libmpx/ 
-B/ssd/uros/gcc-build/x86_64-pc-linux-gnu/./libmpx/mpxwrap 
-L/ssd/uros/gcc-build/x86_64-pc-linux-gnu/./libmpx/mpxwrap/.libs 
-fno-diagnostics-show-caret -fdiagnostics-color=never  -O2 -fprofile-arcs -flto
-r -nostdlib  -c -o c_lto_20100430-1_0.o
/home/uros/gcc-svn/trunk/gcc/testsuite/gcc.dg/lto/20100430-1_0.c(timeout =
300)
spawn -ignore SIGHUP /ssd/uros/gcc-build/gcc/xgcc -B/ssd/uros/gcc-build/gcc/
-fno-use-linker-plugin -B/ssd/uros/gcc-build/x86_64-pc-linux-gnu/./libmpx/
-B/ssd/uros/gcc-build/x86_64-pc-linux-gnu/./libmpx/mpxrt
-L/ssd/uros/gcc-build/x86_64-pc-linux-gnu/./libmpx/mpxrt/.libs
-B/ssd/uros/gcc-build/x86_64-pc-linux-gnu/./libmpx/
-B/ssd/uros/gcc-build/x86_64-pc-linux-gnu/./libmpx/mpxwrap
-L/ssd/uros/gcc-build/x86_64-pc-linux-gnu/./libmpx/mpxwrap/.libs
-fno-diagnostics-show-caret -fdiagnostics-color=never -O2 -fprofile-arcs -flto
-r -nostdlib -c -o c_lto_20100430-1_0.o
/home/uros/gcc-svn/trunk/gcc/testsuite/gcc.dg/lto/20100430-1_0.c
PASS: gcc.dg/lto/20100430-1 c_lto_20100430-1_0.o assemble, -O2 -fprofile-arcs
-flto -r -nostdlib
Executing on host: /ssd/uros/gcc-build/gcc/xgcc -B/ssd/uros/gcc-build/gcc/
c_lto_20100430-1_0.o  -fno-use-linker-plugin   
-B/ssd/uros/gcc-build/x86_64-pc-linux-gnu/./libmpx/ 
-B/ssd/uros/gcc-build/x86_64-pc-linux-gnu/./libmpx/mpxrt 
-L/ssd/uros/gcc-build/x86_64-pc-linux-gnu/./libmpx/mpxrt/.libs 
-B/ssd/uros/gcc-build/x86_64-pc-linux-gnu/./libmpx/ 
-B/ssd/uros/gcc-build/x86_64-pc-linux-gnu/./libmpx/mpxwrap 
-L/ssd/uros/gcc-build/x86_64-pc-linux-gnu/./libmpx/mpxwrap/.libs 
-fno-diagnostics-show-caret -fdiagnostics-color=never  -O2 -fprofile-arcs -flto
-r -nostdlib  -o gcc-dg-lto-20100430-1-01.exe(timeout = 300)
spawn -ignore SIGHUP /ssd/uros/gcc-build/gcc/xgcc -B/ssd/uros/gcc-build/gcc/
c_lto_20100430-1_0.o -fno-use-linker-plugin
-B/ssd/uros/gcc-build/x86_64-pc-linux-gnu/./libmpx/
-B/ssd/uros/gcc-build/x86_64-pc-linux-gnu/./libmpx/mpxrt
-L/ssd/uros/gcc-build/x86_64-pc-linux-gnu/./libmpx/mpxrt/.libs
-B/ssd/uros/gcc-build/x86_64-pc-linux-gnu/./libmpx/
-B/ssd/uros/gcc-build/x86_64-pc-linux-gnu/./libmpx/mpxwrap
-L/ssd/uros/gcc-build/x86_64-pc-linux-gnu/./libmpx/mpxwrap/.libs
-fno-diagnostics-show-caret -fdiagnostics-color=never -O2 -fprofile-arcs -flto
-r -nostdlib -o gcc-dg-lto-20100430-1-01.exe
collect2: fatal error: ld terminated with signal 11 [Segmentation fault], core
dumped
compilation terminated.
compiler exited with status 1
output is:
collect2: fatal error: ld terminated with signal 11 [Segmentation fault], core
dumped
compilation terminated.

FAIL: gcc.dg/lto/20100430-1 c_lto_20100430-1_0.o-c_lto_20100430-1_0.o link, -O2
-fprofile-arcs -flto -r -nostdlib
UNRESOLVED: gcc.dg/lto/20100430-1 c_lto_20100430-1_0.o-c_lto_20100430-1_0.o
execute -O2 -fprofile-arcs -flto -r -nostdlib

[Bug lto/69408] LD crashes with LTO

2016-01-26 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69408

--- Comment #6 from Martin Liška  ---
(In reply to night_ghost from comment #4)
> I can attach script which GCC has been built, and ZIP of the project tree
> which cause crash.

Hi.

That would be beneficial!

[Bug lto/69408] LD crashes with LTO

2016-01-26 Thread ubizjak at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69408

Uroš Bizjak  changed:

   What|Removed |Added

 CC||ubizjak at gmail dot com

--- Comment #5 from Uroš Bizjak  ---
(In reply to Richard Biener from comment #1)
> Waiting for a testcase.  See https://gcc.gnu.org/bugs.html

I *think* I have seen this problem recently on x86_64 Fedora 23 when testsuite
was run with RUNTESTFLAGS="--target_board=unix/-fno-use-linker-plugin"

I'll re-run the testsuite and report here.

[Bug lto/69408] LD crashes with LTO

2016-01-25 Thread night_ghost at ykoctpa dot ru
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69408

--- Comment #4 from night_ghost at ykoctpa dot ru ---
I can attach script which GCC has been built, and ZIP of the project tree which
cause crash.

[Bug lto/69408] LD crashes with LTO

2016-01-25 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69408

Martin Liška  changed:

   What|Removed |Added

 CC||marxin at gcc dot gnu.org

--- Comment #3 from Martin Liška  ---
(In reply to night_ghost from comment #2)
> there are reqirements for reporting *language* bugs but no LTO bugs in
> https://gcc.gnu.org/bugs.html
> 
> I can ZIP build tree but I saw a list of all that i can send in the "we do
> not want". Crash occurs on final linking so I can't give the refined test
> case. But crash always comes.

Hi.

I know that it's harder to provide a reproducer, however I can try to reproduce
the problem on machine. That would require providing steps that one needs to
clone and build the project. As I've seen the project, you probably use a
cross-compiler for AVR?

Martin

[Bug lto/69408] LD crashes with LTO

2016-01-21 Thread night_ghost at ykoctpa dot ru
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69408

--- Comment #2 from night_ghost at ykoctpa dot ru ---
there are reqirements for reporting *language* bugs but no LTO bugs in
https://gcc.gnu.org/bugs.html

I can ZIP build tree but I saw a list of all that i can send in the "we do not
want". Crash occurs on final linking so I can't give the refined test case. But
crash always comes.

[Bug lto/69408] LD crashes with LTO

2016-01-21 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69408

Richard Biener  changed:

   What|Removed |Added

 Target||avr
 Status|UNCONFIRMED |WAITING
   Last reconfirmed||2016-01-21
 Ever confirmed|0   |1

--- Comment #1 from Richard Biener  ---
Waiting for a testcase.  See https://gcc.gnu.org/bugs.html