emerging dclib 0.3.3(-r1) with g++ (GCC) 3.4.3 20041125 (Gentoo Linux 3.4.3-r1, ssp-3.4.3-0, pie-8.7.7) does not work because of an internal compiler error. cmd5.cpp: In function `std::ostream& operator<<(std::ostream&, CMD5)': cmd5.cpp:294: internal compiler error: in sweep_string_variable, at protector.c:1158 Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://bugs.gentoo.org/> for instructions. Preprocessed source stored into /var/tmp/portage/dclib-0.3.3-r1/temp/ccroW5HV.out file, please attach this to your bugreport. make[3]: *** [cmd5.lo] Fehler 1 Solution: CFLAGS must be reduced to CFLAGS="-march=athlon-xp -m3dnow -O3 -pipe" (see used CFLAGS in "additional information") and it will emerge without problems. Reproducible: Always Steps to Reproduce: 1. Set aggressive CFLAGS 2. emerge dclib 3. Set safe CFLAGS Portage 2.0.51-r8 (default-linux/x86/2004.0, gcc-3.4.3, glibc-2.3.4.20041102-r0, 2.6.9-gentoo-r4 i686) ================================================================= System uname: 2.6.9-gentoo-r4 i686 AMD Athlon(tm) XP 1700+ Gentoo Base System version 1.6.7 Python: dev-lang/python-2.3.4 [2.3.4 (#1, Oct 31 2004, 11:46:53)] distcc 2.17 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled] ccache version 2.3 [enabled] dev-lang/python: 2.3.4 sys-devel/autoconf: 2.59-r6, 2.13 sys-devel/automake: 1.5, 1.4_p6, 1.6.3, 1.7.9, 1.9.3 sys-devel/binutils: 2.15.92.0.2-r1, 2.15.92.0.2-r2 sys-devel/libtool: 1.5.10-r1 virtual/os-headers: 2.6.8.1-r1 ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CFLAGS="-march=athlon-xp -m3dnow -mfpmath=sse -O3 -pipe -fforce-addr -fomit-frame-pointer -funroll-loops -falign-functions=4 -maccumulate-outgoing-args -ffast-math -fprefetch-loop-arrays -fstack-protector" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3/share/config /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-march=athlon-xp -m3dnow -mfpmath=sse -O3 -pipe -fforce-addr -fomit-frame-pointer -funroll-loops -falign-functions=4 -maccumulate-outgoing-args -ffast-math -fprefetch-loop-arrays -fstack-protector" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs autoconfig ccache digest distlocks sandbox sfperms" GENTOO_MIRRORS="ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/gentoo ftp://linux.rz.ruhr-uni-bochum.de/gentoo-mirror/ http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror/" MAKEOPTS="-j4" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="3dnow X acpi alsa apache2 arts artswrappersuid avi bash-completion cdr crypt cups curl dga directfb divx4linux dvd encode exif extensions f77 fbcon ftp gif gpm gtk gtk2 icq imagemagick jabber java jikes jpeg kde lesstif libwww maildirmmx motif mozilla mpeg mysql ncurses network nls nptl nptlonly oggvorbis ooo-kde opengl oscar pam pdflib perl png posix ppds python qt quicktime readline real samba scanner sdl slang speex spell sse ssl svg svga tcltk tetex tiff truetype unicode usb wmf wxwindows x86 xine xml xml2 xmms xosd xv xvid zlib linguas_de"
I have the problem if using gcc-3.3.3. I only did 'gcc-config 2' (2=gcc-3.4.3) and 'source /etc/profile' and it compiled fine even with CFLAGS="-O3 -march=athlon-xp -mfpmath=sse -mmmx -msse -mno-sse2 -mno-sse3 -m3dnow -funroll-loops -fomit-frame-pointer -pipe".
I have the same error, but only with hardened gcc-3.4.3 (vanilla gcc-3.4.3 works fine) and CFLAGS="-march=athlon-xp -O2 -pipe -frename-registers -fomit-frame-pointer ".
*** Bug 76466 has been marked as a duplicate of this bug. ***
*** Bug 77752 has been marked as a duplicate of this bug. ***
*** Bug 94229 has been marked as a duplicate of this bug. ***
*** Bug 81191 has been marked as a duplicate of this bug. ***
*** Bug 97166 has been marked as a duplicate of this bug. ***
I'm getting the same internal compiler error when compiling net-libs/libtorrent-0.7.1 using gcc (GCC) 3.4.4 (Gentoo 3.4.4, ssp-3.4.4-1.0, pie-8.7.8): g++ -DHAVE_CONFIG_H -I. -I. -I../.. -I. -I./.. -I../.. -march=athlon-xp -O2 -pipe -fstack-protector -DNDEBUG -I/usr/include/sigc++-2.0 -I/usr/lib/sigc++-2.0/include -c connection_list.cc -fPIC -DPIC -o connection_list.lo /usr/lib/gcc/i686-pc-linux-gnu/3.4.4/include/g++-v3/bits/stl_algo.h: In function `_RandomAccessIterator std::find_if(_RandomAccessIterator, _RandomAccessIterator, _Predicate, std::random_access_iterator_tag) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<torrent::PeerConnectionBase**, std::vector<torrent::PeerConnectionBase*, std::allocator<torrent::PeerConnectionBase*> > >, _Predicate = rak::_equal<torrent::PeerInfo, std::const_mem_fun_t<const torrent::PeerInfo&, torrent::PeerConnectionBase> >]': /usr/lib/gcc/i686-pc-linux-gnu/3.4.4/include/g++-v3/bits/stl_algo.h:292: internal compiler error: in sweep_string_variable, at protector.c:1158 Preprocessed source attached as requested.
Created attachment 65975 [details] Preprocessed source leading to internal compiler error Preprocessed source for comment #8.
*** Bug 103500 has been marked as a duplicate of this bug. ***
Created attachment 71237 [details] Pre-processed code causing an ICE with i686-pc-linux-gnu-3.4.4 I get the same ICE: /usr/lib/gcc/i686-pc-linux-gnu/3.4.4/include/g++-v3/bits/stl_pair.h: In function `std::pair<_T1, _T2> std::make_pair(_T1, _T2) [with _T1 = const XML_Char*, _T2 = boost::variant<bool, int8_t, uint8_t, int16_t, uint16_t, int32_t, uint32_t, int64_t, uint64_t, float, double, std::string, std::wstring, boost::gregorian::date, mantra::duration, boost::posix_time::ptime, mantra::NullValue, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_>]': /usr/lib/gcc/i686-pc-linux-gnu/3.4.4/include/g++-v3/bits/stl_pair.h:144: internal compiler error: in sweep_string_variable, at protector.c:1158 Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://bugs.gentoo.org/> for instructions. Preprocessed source stored into /tmp/ccVMKFeL.out file, please attach this to your bugreport. I've attached the pre-processed code. Though the original source file (http://www.neuromancy.net/viewcvs/Mantra-I/src/storage/xml.cpp?root=mantra&rev=1.40&view=markup) is only 1400 lines (including comments), when I try to compile this code, I've seen it use >330mb of RAM.
Could everyone who has this problem, please post combinations of: 1) Compiler version 2) CFLAGS which cause the ICE?
(In reply to comment #12) > Could everyone who has this problem, please post combinations of: > > 1) Compiler version > 2) CFLAGS > > which cause the ICE? > ICE occurs during compilation of libfpx-1.2.0.9 1) gcc-config gives i686-pc-linux-gnu-3.4.4 2) CFLAGS="-O2 -march=i686 -pipe"
Compiles successfully with: i686-pc-linux-gnu-3.3.6 i686-pc-linux-gnu-3.4.4-vanilla Fails with: i686-pc-linux-gnu-3.4.4 CFLAGS,CXXFLAGS="-O2 -march=athlon-xp -pipe -fomit-frame-pointer" CFLAGS,CXXFLAGS="-O2 -march=athlon-xp -pipe -fomit-frame-pointer" CFLAGS,CXXFLAGS=""
Created attachment 74471 [details] preprocessed.c++.bz2 The ICE reproducible by simply "g++ -c preprocessed.c++". fails for: 6,7 compiles for: 1,2,3,4,5,8,9,10 gcc-config -l [1] i686-pc-linux-gnu-3.3.6 [2] i686-pc-linux-gnu-3.3.6-hardenednopie [3] i686-pc-linux-gnu-3.3.6-hardenednopiessp [4] i686-pc-linux-gnu-3.3.6-hardenednossp [5] i686-pc-linux-gnu-3.3.6-vanilla [6] i686-pc-linux-gnu-3.4.4 * [7] i686-pc-linux-gnu-3.4.4-hardenednopie [8] i686-pc-linux-gnu-3.4.4-hardenednopiessp [9] i686-pc-linux-gnu-3.4.4-hardenednossp [10] i686-pc-linux-gnu-3.4.4-vanilla --- test: gcc-config <n> source /etc/profile g++ -c preprocessed.c++
Fails with: gcc version 3.4.4 (Gentoo Hardened 3.4.4-r1, ssp-3.4.4-1.0, pie-8.7.8) CFLAGS="-O2 -march=athlon-xp -fomit-frame-pointer -pipe" CXXFLAGS="${CFLAGS}" CHOST="i686-pc-linux-gnu" Works with: Reading specs from /usr/lib/gcc/i686-pc-linux-gnu/3.4.4/vanilla.specs sigh...
I think this also applies to media-libs/libfpx-1.2.0.9 Same error message (internal compiler error: in sweep_string_variable) and works fine with vanilla gcc. (i686-pc-linux-gnu-3.4.4) Tested with: i686-pc-linux-gnu-3.4.4-hardened CFLAGS/CXXFLAGS="-O2 -march=pentium4 -pipe -msse3"
*** Bug 117174 has been marked as a duplicate of this bug. ***
*** Bug 109833 has been marked as a duplicate of this bug. ***
*** Bug 107833 has been marked as a duplicate of this bug. ***
Created attachment 76527 [details, diff] Avoid sweep string variable ICE; issue a warning when it occurs Ok; here goes nothing. Patch is for gcc-3 (NOT gcc-4 where everything is different). It avoids the ICE that occurs in the affected packages, and instead issues a warning. It should generate working executables, however it may mean that one of the steps SSP takes to protect functions is not taken properly. In other words, while it's better than switching off SSP completely, it may leave some functions partly unprotected. To try it out, add this patch to sys-devel/gcc, and remove 'filter-flags -fstack-protector' from the ebuilds of the affected packages if present (all in your overlay or course). Please report here if any of the packages that previously ICE'd in sweep_string_variable still ICE, or if the application builds but doesn't run properly.
Any final versions should probably be wrappered in #ifdef __i386__ as it seems this only effects x86 arch according to kumba
I applied Kevin's patch to gcc-3.4.5 and it fixed up my compile problems with both versions of hylafax currently in the tree (4.2.3-r1 and 4.2.4). These problems are described in bug 109833. Thanks :)
Only tested on a Mips box atm. I'll have to reboot my sparc64 box (it's deadlocked) and test it later on to see if it's affected as well. Will update on how that works out.
*** Bug 119586 has been marked as a duplicate of this bug. ***
*** Bug 120569 has been marked as a duplicate of this bug. ***
Created attachment 78347 [details] preprocessed source that fails to compile compiles with gcc 3.3.6 (hardened), and gcc 3.4.4-hardened-nossp. It fails with 3.4.4 (hardened). I did not apply any optoins, just tried g++ -c failed.cc
(In reply to comment #27) > It fails with 3.4.4 (hardened). > I did not apply any optoins, just tried g++ -c failed.cc Adding -O2 optimises away the ICEs (i.e. 'g++ -O2 -c failed.cc' compiles cleanly).
(In reply to comment #28) > (In reply to comment #27) > > It fails with 3.4.4 (hardened). > > I did not apply any optoins, just tried g++ -c failed.cc > > Adding -O2 optimises away the ICEs (i.e. 'g++ -O2 -c failed.cc' compiles > cleanly). As well as -O3 and -Os. I patched boost to always optimize (even for debug libraries), and I will see if it builds.
Created attachment 79129 [details] another failed source This one is from libfpx, and compiles with -fno-stack-protector. A few -O options I tried do not affect it, and it does not compile with just gcc -c (gcc 3.4.4). gcc 3.3.6 compiles it.
*** Bug 122349 has been marked as a duplicate of this bug. ***
The gcc patch also fixes boost and libfpx. Thanks
*** Bug 122765 has been marked as a duplicate of this bug. ***
*** Bug 125583 has been marked as a duplicate of this bug. ***
Created attachment 81777 [details] Reduced testcase Incase anyone wants this to look at it, here is a reduced testcase which triggers the bug.
I confirm that the problem is exposed by the latest test case provided. Error --------------- storri@base ~ $ g++ -fstack-protector -o test test.cc test.cc: In constructor `PErrorsList::PErrorsList(OSErr, FicNom)': test.cc:33: internal compiler error: in sweep_string_variable, at protector.c:1158 Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://bugs.gentoo.org/> for instructions. Preprocessed source stored into /tmp/ccWWEgva.out file, please attach this to your bugreport. Compiler ---------------------- storri@base ~ $ gcc -v Reading specs from /usr/lib/gcc/i686-pc-linux-gnu/3.4.5/specs Configured with: /var/tmp/portage/gcc-3.4.5/work/gcc-3.4.5/configure --prefix=/usr --bindir=/usr/i686-pc-linux-gnu/gcc-bin/3.4.5 --includedir=/usr/lib/gcc/i686-pc-linux-gnu/3.4.5/include --datadir=/usr/share/gcc-data/i686-pc-linux-gnu/3.4.5 --mandir=/usr/share/gcc-data/i686-pc-linux-gnu/3.4.5/man --infodir=/usr/share/gcc-data/i686-pc-linux-gnu/3.4.5/info --with-gxx-include-dir=/usr/lib/gcc/i686-pc-linux-gnu/3.4.5/include/g++-v3 --host=i686-pc-linux-gnu --build=i686-pc-linux-gnu --disable-altivec --enable-nls --without-included-gettext --with-system-zlib --disable-checking --disable-werror --disable-libunwind-exceptions --disable-multilib --enable-java-awt=gtk --enable-languages=c,c++,java,f77 --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu Thread model: posix gcc version 3.4.5 (Gentoo 3.4.5, ssp-3.4.5-1.0, pie-8.7.9)
*** Bug 127325 has been marked as a duplicate of this bug. ***
*** Bug 128238 has been marked as a duplicate of this bug. ***
*** Bug 134901 has been marked as a duplicate of this bug. ***
*** Bug 133759 has been marked as a duplicate of this bug. ***
Fails with: /usr/lib/gcc/i686-pc-linux-gnu/3.4.6/include/g++-v3/bits/stl_algo.h:292: internal compiler error: in sweep_string_variable, at protector.c:1158 Please submit a full bug report, with preprocessed source if appropriate. Preprocessed source stored into /var/tmp/portage/libtorrent-0.8.3/temp/ccGRYuLy.out file, please attach this to your bugreport. make[3]: *** [connection_list.lo] Error 1 make[3]: *** Waiting for unfinished jobs.... emerge --info Portage 2.0.54-r2 (hardened/x86/2.6, gcc-3.4.6, glibc-2.3.6-r3, 2.6.14-hardened-r7 i686) ================================================================= System uname: 2.6.14-hardened-r7 i686 Pentium III (Coppermine) Gentoo Base System version 1.6.14 dev-lang/python: 2.4.2 dev-python/pycrypto: [Not Present] dev-util/ccache: [Not Present] dev-util/confcache: [Not Present] sys-apps/sandbox: 1.2.17 sys-devel/autoconf: 2.13, 2.59-r7 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1 sys-devel/binutils: 2.16.1-r2 sys-devel/libtool: 1.5.22 virtual/os-headers: 2.6.11-r2 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CBUILD="i686-pc-linux-gnu" CFLAGS="-Os -march=pentium3 -pipe" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /var/qmail/alias /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-Os -march=pentium3 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig distlocks sandbox sfperms strict" GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo" MAKEOPTS="-j3" PKGDIR="/usr/portage//packages/x86/" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage/" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="apache2 berkdb bzip2 crypt curl dlloader expat gd gif gmp hardened idn jpeg mhash mysql ncurses nls pam pcre perl php pic png postgres python qmail readline sqlite ssl tcpd udev userlocales x86 xml xml2 xorg zlib userland_GNU kernel_linux elibc_glibc" Unset: CTARGET, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_RSYNC_EXTRA_OPTS, PORTAGE_RSYNC_OPTS, PORTDIR_OVERLAY
Mark, I've committed my change to protector.c to remove this ICE for 3.4.6; if you could roll it up if you release 3.4.6 again that'd be great.
you want a revbump ?
ultimately, yes please - but I'll do #104754 (SSP specs consistency) first to avoid unnecessary bumps (it's top of my list), and maybe if we can find what's wrong, a fix for #133301.
*** Bug 136712 has been marked as a duplicate of this bug. ***
*** Bug 137698 has been marked as a duplicate of this bug. ***
*** Bug 137873 has been marked as a duplicate of this bug. ***
Is it possible to post patch somewhere? I want to use it as overlay as i'm need of pdns-recursor.
(In reply to comment #48) > Is it possible to post patch somewhere? I want to use it as overlay as i'm need > of pdns-recursor. It's already attached to this bug - see the 4th attachment "Avoid sweep string variable ICE; issue a warning when it occurs" (actually the final patch is a little tidier, but that's just cosmetic). SpanKY - when you get chance, can you do the bump including also the fix for #104754? The patches for this bug and #104754 are in the patchset CVS in ssp and piepatches directories respectively. I did a trial-run of a bump with gcc-3.4.6-ssp-1.0.tar.bz2 and gcc-3.4.6-piepatches-v8.7.9.tar.bz2 and it seemed to go fine. Or give me the nod if you're happy for me to do it.
Sorry, i was confused about its creation date. Thanks a lot.
feel free to push out ssp/pie fixes for gcc-3.x ... if you need something, just grab me on irc
ok; sys-devel/gcc-3.4.6-r2 is in, with this fix
gcc-3.4.6-r2 emerges ok, pdns-recursor emerges ok, everything is working great. Thank you guys.
*** Bug 140363 has been marked as a duplicate of this bug. ***
*** Bug 142246 has been marked as a duplicate of this bug. ***
*** Bug 142890 has been marked as a duplicate of this bug. ***
*** Bug 148594 has been marked as a duplicate of this bug. ***
*** Bug 158298 has been marked as a duplicate of this bug. ***
(In reply to comment #52) > ok; sys-devel/gcc-3.4.6-r2 is in, with this fix ... and stable for some time, closing. Yay! :)