public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug lto/58528] New: lto1: internal compiler error: in build_abbrev_table, at dwarf2out.c:7478
@ 2013-09-25 11:15 charles.frasch at gmail dot com
  2013-09-25 12:35 ` [Bug lto/58528] " rguenth at gcc dot gnu.org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: charles.frasch at gmail dot com @ 2013-09-25 11:15 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58528

            Bug ID: 58528
           Summary: lto1: internal compiler error: in build_abbrev_table,
                    at dwarf2out.c:7478
           Product: gcc
           Version: 4.8.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: lto
          Assignee: unassigned at gcc dot gnu.org
          Reporter: charles.frasch at gmail dot com

cfrasch@theme-dev3:~/projects/theme_clean(feature/lto)$ g++ -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.8/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu
4.8.1-2ubuntu1~12.04' --with-bugurl=file:///usr/share/doc/gcc-4.8/README.Bugs
--enable-languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr
--program-suffix=-4.8 --enable-shared --enable-linker-build-id
--libexecdir=/usr/lib --without-included-gettext --enable-threads=posix
--with-gxx-include-dir=/usr/include/c++/4.8 --libdir=/usr/lib --enable-nls
--with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug
--enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin
--with-system-zlib --disable-browser-plugin --enable-java-awt=gtk
--enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.8-amd64/jre
--enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.8-amd64
--with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.8-amd64
--with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar
--enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686
--with-abi=m64 --with-multilib-list=m32,m64 --with-tune=generic
--enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu
--target=x86_64-linux-gnu
Thread model: posix
gcc version 4.8.1 (Ubuntu 4.8.1-2ubuntu1~12.04) 


The offending invocation:
/usr/bin/g++   -O2 -g -DNDEBUG       -static-libstdc++ -flto -O2
CMakeFiles/Fix_Engine_Detail_ut.dir/Message_Index_ut.cpp.o
CMakeFiles/Fix_Engine_Detail_ut.dir/Message_Log_ut.cpp.o
CMakeFiles/Fix_Engine_Detail_ut.dir/Sequential_Message_Log_ut.cpp.o  -o
Fix_Engine_Detail_ut -rdynamic ../../libfix_engine.a
../../../middleware/libmiddleware.a /usr/local/gtest/gtest/lib/libgtest.a
../../../test/gtest/libtheme-gtest.a ../../../test/libtheme-test.a
/usr/local/boost/boost_1_54_0/lib/libboost_filesystem.a
/usr/local/boost/boost_1_54_0/lib/libboost_program_options.a
/usr/local/boost/boost_1_54_0/lib/libboost_random.a
/usr/local/boost/boost_1_54_0/lib/libboost_regex.a
/usr/local/boost/boost_1_54_0/lib/libboost_serialization.a
/usr/local/boost/boost_1_54_0/lib/libboost_system.a -lrt -lpthread
../../../attributes/libattributes.a ../../../msgs/libmessages.a
/usr/local/lib/libzmq.a -Wl,--whole-archive -Wl,-Bstatic -libverbs -lmlx4
-Wl,-Bdynamic -Wl,--no-whole-archive -Wl,-Bstatic -libmad -libumad
-Wl,-Bdynamic -ldl ../../../json/libjsoncpp.a ../../../libtheme.a
/usr/local/boost/boost_1_54_0/lib/libboost_filesystem.a
/usr/local/boost/boost_1_54_0/lib/libboost_program_options.a
/usr/local/boost/boost_1_54_0/lib/libboost_system.a -lrt -lpthread -save-temps


The files generated with -save-temps are NOT attached because of file
attachment size restrictions. If you need them I can send you one or all 18 .s
files


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug lto/58528] lto1: internal compiler error: in build_abbrev_table, at dwarf2out.c:7478
  2013-09-25 11:15 [Bug lto/58528] New: lto1: internal compiler error: in build_abbrev_table, at dwarf2out.c:7478 charles.frasch at gmail dot com
@ 2013-09-25 12:35 ` rguenth at gcc dot gnu.org
  2013-09-26 11:30 ` rguenth at gcc dot gnu.org
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-09-25 12:35 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58528

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Please try to reduce the testcase, see
http://gcc.gnu.org/wiki/A_guide_to_testcase_reduction


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug lto/58528] lto1: internal compiler error: in build_abbrev_table, at dwarf2out.c:7478
  2013-09-25 11:15 [Bug lto/58528] New: lto1: internal compiler error: in build_abbrev_table, at dwarf2out.c:7478 charles.frasch at gmail dot com
  2013-09-25 12:35 ` [Bug lto/58528] " rguenth at gcc dot gnu.org
@ 2013-09-26 11:30 ` rguenth at gcc dot gnu.org
  2013-09-26 19:56 ` charles.frasch at gmail dot com
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-09-26 11:30 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58528

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
The approach documented only works for ICEs at WPA time.  For ICEs
at LTRANS time you'd have to continue after WPA by instead of lto1
invoking the driver with the linker command.

Thus, bisect the object files and libraries in

/usr/bin/g++   -O2 -g -DNDEBUG       -static-libstdc++ -flto -O2
CMakeFiles/Fix_Engine_Detail_ut.dir/Message_Index_ut.cpp.o
CMakeFiles/Fix_Engine_Detail_ut.dir/Message_Log_ut.cpp.o
CMakeFiles/Fix_Engine_Detail_ut.dir/Sequential_Message_Log_ut.cpp.o  -o
Fix_Engine_Detail_ut -rdynamic ../../libfix_engine.a
../../../middleware/libmiddleware.a /usr/local/gtest/gtest/lib/libgtest.a
../../../test/gtest/libtheme-gtest.a ../../../test/libtheme-test.a
/usr/local/boost/boost_1_54_0/lib/libboost_filesystem.a
/usr/local/boost/boost_1_54_0/lib/libboost_program_options.a
/usr/local/boost/boost_1_54_0/lib/libboost_random.a
/usr/local/boost/boost_1_54_0/lib/libboost_regex.a
/usr/local/boost/boost_1_54_0/lib/libboost_serialization.a
/usr/local/boost/boost_1_54_0/lib/libboost_system.a -lrt -lpthread
../../../attributes/libattributes.a ../../../msgs/libmessages.a
/usr/local/lib/libzmq.a -Wl,--whole-archive -Wl,-Bstatic -libverbs -lmlx4
-Wl,-Bdynamic -Wl,--no-whole-archive -Wl,-Bstatic -libmad -libumad
-Wl,-Bdynamic -ldl ../../../json/libjsoncpp.a ../../../libtheme.a
/usr/local/boost/boost_1_54_0/lib/libboost_filesystem.a
/usr/local/boost/boost_1_54_0/lib/libboost_program_options.a
/usr/local/boost/boost_1_54_0/lib/libboost_system.a -lrt -lpthread

adding -r -nostdlib to it (that is, drop as many objects from it as possible).
If the failure also persists with -flto-partition=1to1 then this reduction
will be much more deterministic.

For the remaining object files and libraries try to build up a compile-and-link
commandline substituting sources for objects and provide preprocessed
source for them.

Hopefully the process ends up in one (unlikely) to three source files needed.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug lto/58528] lto1: internal compiler error: in build_abbrev_table, at dwarf2out.c:7478
  2013-09-25 11:15 [Bug lto/58528] New: lto1: internal compiler error: in build_abbrev_table, at dwarf2out.c:7478 charles.frasch at gmail dot com
  2013-09-25 12:35 ` [Bug lto/58528] " rguenth at gcc dot gnu.org
  2013-09-26 11:30 ` rguenth at gcc dot gnu.org
@ 2013-09-26 19:56 ` charles.frasch at gmail dot com
  2013-09-27 11:59 ` charles.frasch at gmail dot com
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: charles.frasch at gmail dot com @ 2013-09-26 19:56 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58528

--- Comment #4 from Charles <charles.frasch at gmail dot com> ---
This seems to be the min to reproduce the error. I have also managed to greatly
reduce the size of the archive libraries. That should help keep the .i file
smaller.

/usr/bin/g++ -O2 -g -DNDEBUG -static-libstdc++ -flto 
CMakeFiles/Fix_Engine_Detail_ut.dir/Fix_Engine_Detail_ut.cpp.o  -o
Fix_Engine_Detail_ut -rdynamic ../../libfix_engine.a
../../../middleware/libmiddleware.a /usr/local/gtest/gtest/lib/libgtest.a
../../../test/gtest/libtheme-gtest.a ../../../test/libtheme-test.a
/usr/local/boost/boost_1_54_0/lib/libboost_filesystem.a     -lrt 
../../../libtheme.a

Adding -r -nostdlib causes the ICE to go away


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug lto/58528] lto1: internal compiler error: in build_abbrev_table, at dwarf2out.c:7478
  2013-09-25 11:15 [Bug lto/58528] New: lto1: internal compiler error: in build_abbrev_table, at dwarf2out.c:7478 charles.frasch at gmail dot com
                   ` (2 preceding siblings ...)
  2013-09-26 19:56 ` charles.frasch at gmail dot com
@ 2013-09-27 11:59 ` charles.frasch at gmail dot com
  2014-04-28  9:07 ` ostash at ostash dot kiev.ua
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: charles.frasch at gmail dot com @ 2013-09-27 11:59 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58528

--- Comment #6 from Charles <charles.frasch at gmail dot com> ---
Created attachment 30912
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30912&action=edit
script to reproduce the ICE

This script reproduces the bug. It requires 27 .ii files and one archive file
of Google's gtest 1.6.0. If this is acceptable will either attach the .ii files
or send you a tarball directly.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug lto/58528] lto1: internal compiler error: in build_abbrev_table, at dwarf2out.c:7478
  2013-09-25 11:15 [Bug lto/58528] New: lto1: internal compiler error: in build_abbrev_table, at dwarf2out.c:7478 charles.frasch at gmail dot com
                   ` (3 preceding siblings ...)
  2013-09-27 11:59 ` charles.frasch at gmail dot com
@ 2014-04-28  9:07 ` ostash at ostash dot kiev.ua
  2014-05-30 11:35 ` blade at debian dot org
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: ostash at ostash dot kiev.ua @ 2014-04-28  9:07 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58528

Viktor Ostashevskyi <ostash at ostash dot kiev.ua> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ostash at ostash dot kiev.ua

--- Comment #7 from Viktor Ostashevskyi <ostash at ostash dot kiev.ua> ---
I managed to trigger this bug too:

lto1: internal compiler error: in build_abbrev_table, at dwarf2out.c:7478

Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/atse_git/ostash/tc48/libexec/gcc/x86_64-pc-linux-gnu/4.8.3/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../gcc-4.8-20140313/configure --enable-bootstrap
--enable-checking=release --enable-clocale=gnu --enable-__cxa_atexit
--disable-fixed-point --enable-gnu-indirect-function --enable-gnu-unique-object
--enable-initfini-array --enable-languages=c,c++ --disable-libmudflap
--disable-libssp --disable-libstdcxx-pch --enable-libstdcxx-time
--disable-libquadmath --disable-libquadmath-support --enable-linux-futex
--enable-lto --disable-multiarch --disable-multilib --disable-nls
--enable-plugin --enable-secureplt --disable-sjlj-exceptions
--enable-threads=posix --enable-tls --with-build-config=bootstrap-lto
--with-gnu-as --with-gnu-ld --with-linker-hash-style=gnu --with-system-zlib
--host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu
--target=x86_64-pc-linux-gnu
Thread model: posix
gcc version 4.8.3 20140313 (prerelease) (GCC)

I can't provide sources unfortunately.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug lto/58528] lto1: internal compiler error: in build_abbrev_table, at dwarf2out.c:7478
  2013-09-25 11:15 [Bug lto/58528] New: lto1: internal compiler error: in build_abbrev_table, at dwarf2out.c:7478 charles.frasch at gmail dot com
                   ` (4 preceding siblings ...)
  2014-04-28  9:07 ` ostash at ostash dot kiev.ua
@ 2014-05-30 11:35 ` blade at debian dot org
  2014-09-16 10:54 ` npl at chello dot at
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: blade at debian dot org @ 2014-05-30 11:35 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58528

Eduard Bloch <blade at debian dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |blade at debian dot org

--- Comment #8 from Eduard Bloch <blade at debian dot org> ---
I have the same or at least very similar issue and it makes me crazy because it
seems to have something with the position of the -g flag. I.e. this option set
seems to work:
-pthread -g -O3 -Wall -Wextra -Wno-unused-parameter -D_FILE_OFFSET_BITS=64
-flto

but
-pthread -O3 -Wall -Wextra -Wno-unused-parameter -D_FILE_OFFSET_BITS=64 -g
-flto
does not! There also seems to be some kind of race: the first time I tried it
with g++-4.9, it was hanging for a while and then segfaulted, afterwards it's
now running into ICE (same behavior with version 4.8).

I made a build with -save-temps inside, see
https://www.unix-ag.uni-kl.de/~bloch/acng/tmp/ and I can provide source:

git clone https://alioth.debian.org/anonscm/git/apt-cacher-ng/apt-cacher-ng.git

Branch: upstream

Ref: 55661a69fcdc8263101a7849d3f9f83b8b05571b

Command: make -j5 CXXFLAGS="-g -flto" LDFLAGS=-flto apt-cacher-ng


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug lto/58528] lto1: internal compiler error: in build_abbrev_table, at dwarf2out.c:7478
  2013-09-25 11:15 [Bug lto/58528] New: lto1: internal compiler error: in build_abbrev_table, at dwarf2out.c:7478 charles.frasch at gmail dot com
                   ` (5 preceding siblings ...)
  2014-05-30 11:35 ` blade at debian dot org
@ 2014-09-16 10:54 ` npl at chello dot at
  2020-07-16 19:13 ` mark at gcc dot gnu.org
  2020-07-20 15:20 ` charles.frasch at gmail dot com
  8 siblings, 0 replies; 10+ messages in thread
From: npl at chello dot at @ 2014-09-16 10:54 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58528

npl at chello dot at changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |npl at chello dot at

--- Comment #9 from npl at chello dot at ---
I get this issue too, but cant provide sources. The program compiles if -g0 is
used. Happens with gcc 4.8.2 and gcc 4.8.3.

lto1: internal compiler error: in build_abbrev_table, at dwarf2out.c:7478
0x821c8c8 build_abbrev_table
    /tmp/toolchain-make/build/gcc-4.8.2/gcc/dwarf2out.c:7478
0x821c733 build_abbrev_table
    /tmp/toolchain-make/build/gcc-4.8.2/gcc/dwarf2out.c:7535
0x821e19b output_comp_unit
    /tmp/toolchain-make/build/gcc-4.8.2/gcc/dwarf2out.c:8608
0x8237fa0 dwarf2out_finish
    /tmp/toolchain-make/build/gcc-4.8.2/gcc/dwarf2out.c:23557

Target: arm-none-eabi
Configured with: /tmp/toolchain-make/build/gcc-4.8.2/configure
--prefix=/opt/imx28-48v1 --target=arm-none-eabi --enable-languages=c,c++
--disable-libstdcxx-verbose --disable-libmudflap --disable-libssp
--disable-libstdcxx-pch --enable-multilib --disable-shared --disable-nls
--with-system-zlib --enable-tls --with-gnu-as --with-gnu-ld --enable-lto
--with-newlib --with-gmp=/tmp/toolchain-make/build/ggcnativebuild/gmp-5.1.3
--with-mpfr=/tmp/toolchain-make/build/ggcnativebuild/mpfr-3.1.2
--with-mpc=/tmp/toolchain-make/build/ggcnativebuild/mpc-1.0.2
--with-cloog=/tmp/toolchain-make/build/ggcnativebuild/cloog-0.18.0
--with-isl=/tmp/toolchain-make/build/ggcnativebuild/isl-0.11.1
--with-host-libstdcxx='-Wl,-Bstatic,/usr/lib/gcc/i486-linux-gnu/4.7/libstdc++.a,/usr/lib/gcc/i486-linux-gnu/4.7/libsupc++.a,-Bdynamic
-lm'
Thread model: single
gcc version 4.8.2 (GCC)


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug lto/58528] lto1: internal compiler error: in build_abbrev_table, at dwarf2out.c:7478
  2013-09-25 11:15 [Bug lto/58528] New: lto1: internal compiler error: in build_abbrev_table, at dwarf2out.c:7478 charles.frasch at gmail dot com
                   ` (6 preceding siblings ...)
  2014-09-16 10:54 ` npl at chello dot at
@ 2020-07-16 19:13 ` mark at gcc dot gnu.org
  2020-07-20 15:20 ` charles.frasch at gmail dot com
  8 siblings, 0 replies; 10+ messages in thread
From: mark at gcc dot gnu.org @ 2020-07-16 19:13 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58528

Mark Wielaard <mark at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mark at gcc dot gnu.org

--- Comment #10 from Mark Wielaard <mark at gcc dot gnu.org> ---
It isn't entirely clear to me how to replicate this.
Is this still an issue with newer gcc?

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug lto/58528] lto1: internal compiler error: in build_abbrev_table, at dwarf2out.c:7478
  2013-09-25 11:15 [Bug lto/58528] New: lto1: internal compiler error: in build_abbrev_table, at dwarf2out.c:7478 charles.frasch at gmail dot com
                   ` (7 preceding siblings ...)
  2020-07-16 19:13 ` mark at gcc dot gnu.org
@ 2020-07-20 15:20 ` charles.frasch at gmail dot com
  8 siblings, 0 replies; 10+ messages in thread
From: charles.frasch at gmail dot com @ 2020-07-20 15:20 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58528

--- Comment #11 from Charles <charles.frasch at gmail dot com> ---
This is a very old bug against a very old compiler. I no longer have access to
the code that triggered the issue. I would say to go ahead and close it. An
awful lot of changes have been made to lto since the ICE was reported.

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2020-07-20 15:20 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-09-25 11:15 [Bug lto/58528] New: lto1: internal compiler error: in build_abbrev_table, at dwarf2out.c:7478 charles.frasch at gmail dot com
2013-09-25 12:35 ` [Bug lto/58528] " rguenth at gcc dot gnu.org
2013-09-26 11:30 ` rguenth at gcc dot gnu.org
2013-09-26 19:56 ` charles.frasch at gmail dot com
2013-09-27 11:59 ` charles.frasch at gmail dot com
2014-04-28  9:07 ` ostash at ostash dot kiev.ua
2014-05-30 11:35 ` blade at debian dot org
2014-09-16 10:54 ` npl at chello dot at
2020-07-16 19:13 ` mark at gcc dot gnu.org
2020-07-20 15:20 ` charles.frasch at gmail dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).