Bug 86118 - Gcc segfault for big c++ data compilation
Summary: Gcc segfault for big c++ data compilation
Status: RESOLVED WONTFIX
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 5.4.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-06-12 10:25 UTC by Александр Кроль
Modified: 2018-06-14 10:41 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2018-06-12 00:00:00


Attachments
preprocessed file that triggers the bug (998.42 KB, text/plain)
2018-06-12 10:49 UTC, Александр Кроль
Details
second volume of preprocessed file (552.73 KB, text/plain)
2018-06-12 10:50 UTC, Александр Кроль
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Александр Кроль 2018-06-12 10:25:25 UTC
gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 5.4.0-6ubuntu1~16.04.9' --with-bugurl=file:///usr/share/doc/gcc-5/README.Bugs --enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-5 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --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-5-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-5-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-5-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,mx32 --enable-multilib --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 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.9) 
-----------------------------------------------------------------------
compilation command:
/usr/local/bin/mpic++ --save-temps   -DQT_CORE_LIB -DQT_NO_DEBUG -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore -isystem /usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++-64  -Wall -Wextra -std=c++11 -O2 -fPIC   -fPIC -o ./idfs.cc.o -c ./idfs.cc
-----------------------------------------------------------------------
compiler output:
g++: internal compiler error: Segmentation fault (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-5/README.Bugs> for instructions.
Comment 1 Александр Кроль 2018-06-12 10:49:36 UTC
Created attachment 44262 [details]
preprocessed file that triggers the bug

Due to size limit following command sequence was done:
1. bzip2 -k ./idfs.ii
2. tar -c -M --tape-length=1000 --file=idfs1.tar.gz ./idfs.ii.bz2
^GPrepare volume #2 for ‘idfs1.tar.gz’ and hit return: n idfs2.tar.gz
Comment 2 Александр Кроль 2018-06-12 10:50:23 UTC
Created attachment 44263 [details]
second volume of preprocessed file

Due to size limit following command sequence was done:
1. bzip2 -k ./idfs.ii
2. tar -c -M --tape-length=1000 --file=idfs1.tar.gz ./idfs.ii.bz2
^GPrepare volume #2 for ‘idfs1.tar.gz’ and hit return: n idfs2.tar.gz
Comment 3 Martin Liška 2018-06-12 14:48:29 UTC
Can you please provide steps to merge it back and extract?
Comment 4 Александр Кроль 2018-06-13 09:17:51 UTC
1. tar -x -M --file=idfs1.tar.gz ./idfs.ii.bz2
Prepare volume #2 for ‘idfs1.tar.gz’ and hit return: n idfs2.tar.gz
2. bunzip2 ./idfs.ii.bz2
Comment 5 Martin Liška 2018-06-14 08:38:11 UTC
Thanks, now please attach output of --verbose. I need to investigate -march options.
Comment 6 Александр Кроль 2018-06-14 09:24:51 UTC
command: /usr/local/bin/mpic++ --verbose --save-temps   -DQT_CORE_LIB -DQT_NO_DEBUG -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore -isystem /usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++-64  -Wall -Wextra -std=c++11 -O2 -fPIC   -fPIC -o ./idfs.cc.o -c ./idfs.cc
------------------------------------------------------------------------------
output: Using built-in specs.
COLLECT_GCC=g++
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 5.4.0-6ubuntu1~16.04.9' --with-bugurl=file:///usr/share/doc/gc\
c-5/README.Bugs --enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-5 --enable-shared\
 --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-\
nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=n\
ew --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --with-system-zlib --disable-browser-pl\
ugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-5-amd64/jre --enable-java-home --w\
ith-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-5-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-5-amd64 --with-ar\
ch-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,mx32 --enable-multilib --with-tune=generic --enable-checking=releas\
e --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.9)
COLLECT_GCC_OPTIONS='-v' '-save-temps' '-D' 'QT_CORE_LIB' '-D' 'QT_NO_DEBUG' '-isystem' '/usr/include/x86_64-linux-gnu/qt5' '\
-isystem' '/usr/include/x86_64-linux-gnu/qt5/QtCore' '-isystem' '/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++-64' '-Wall' \
'-Wextra' '-std=c++11' '-O2' '-fPIC' '-o' './idfs.cc.o' '-c' '-I' '/usr/local/include' '-shared-libgcc' '-mtune=generic' '-ma\
rch=x86-64'
 /usr/lib/gcc/x86_64-linux-gnu/5/cc1plus -E -quiet -v -I /usr/local/include -imultiarch x86_64-linux-gnu -D_GNU_SOURCE -D QT_\
CORE_LIB -D QT_NO_DEBUG -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore -isystem\
 /usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++-64 ./idfs.cc -mtune=generic -march=x86-64 -std=c++11 -Wall -Wextra -fPIC -O2\
 -fpch-preprocess -fstack-protector-strong -Wformat-security -o idfs.ii
ignoring duplicate directory "/usr/include/x86_64-linux-gnu/c++/5"
ignoring nonexistent directory "/usr/local/include/x86_64-linux-gnu"
ignoring nonexistent directory "/usr/lib/gcc/x86_64-linux-gnu/5/../../../../x86_64-linux-gnu/include"
ignoring duplicate directory "/usr/local/include"
  as it is a non-system directory that duplicates a system directory
#include "..." search starts here:
#include <...> search starts here:
 /usr/include/x86_64-linux-gnu/qt5
 /usr/include/x86_64-linux-gnu/qt5/QtCore
 /usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++-64
 /usr/include/c++/5
 /usr/include/x86_64-linux-gnu/c++/5
 /usr/include/c++/5/backward
 /usr/lib/gcc/x86_64-linux-gnu/5/include
 /usr/local/include
 /usr/lib/gcc/x86_64-linux-gnu/5/include-fixed
 /usr/include/x86_64-linux-gnu
 /usr/include
End of search list.
COLLECT_GCC_OPTIONS='-v' '-save-temps' '-D' 'QT_CORE_LIB' '-D' 'QT_NO_DEBUG' '-isystem' '/usr/include/x86_64-linux-gnu/qt5' '\
-isystem' '/usr/include/x86_64-linux-gnu/qt5/QtCore' '-isystem' '/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++-64' '-Wall' \
'-Wextra' '-std=c++11' '-O2' '-fPIC' '-o' './idfs.cc.o' '-c' '-I' '/usr/local/include' '-shared-libgcc' '-mtune=generic' '-ma\
rch=x86-64'
 /usr/lib/gcc/x86_64-linux-gnu/5/cc1plus -fpreprocessed idfs.ii -quiet -dumpbase idfs.cc -mtune=generic -march=x86-64 -auxbas\
e-strip ./idfs.cc.o -O2 -Wall -Wextra -std=c++11 -version -fPIC -fstack-protector-strong -Wformat-security -o idfs.s
GNU C++11 (Ubuntu 5.4.0-6ubuntu1~16.04.9) version 5.4.0 20160609 (x86_64-linux-gnu)
    compiled by GNU C version 5.4.0 20160609, GMP version 6.1.0, MPFR version 3.1.4, MPC version 1.0.3
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
GNU C++11 (Ubuntu 5.4.0-6ubuntu1~16.04.9) version 5.4.0 20160609 (x86_64-linux-gnu)
    compiled by GNU C version 5.4.0 20160609, GMP version 6.1.0, MPFR version 3.1.4, MPC version 1.0.3
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: d8217bc73be730fa402b500d5726a5b4
g++: internal compiler error: Segmentation fault (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-5/README.Bugs> for instructions.
Comment 7 Martin Liška 2018-06-14 10:10:39 UTC
Ok, I can see the ICE, but GCC 5.4.0 is out of support. Please try a newer version. If you see it again, please reopen the issue.
Comment 8 Александр Кроль 2018-06-14 10:41:13 UTC
Thank you. however I have not got the point of providing additional information. I specified gcc version initially.