Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 217112 - Compiling dev-cpp/glibmm-2.16.1 with SSP-enabled gcc-3.4.6 results in immediate memory saturation, failure
Summary: Compiling dev-cpp/glibmm-2.16.1 with SSP-enabled gcc-3.4.6 results in immedia...
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Hardened (show other bugs)
Hardware: All Linux
: High normal
Assignee: The Gentoo Linux Hardened Team
URL:
Whiteboard:
Keywords:
: 226017 234888 258354 (view as bug list)
Depends on:
Blocks: 135265
  Show dependency tree
 
Reported: 2008-04-10 10:37 UTC by Xake
Modified: 2009-10-14 00:56 UTC (History)
12 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
While emergeing Gnome, glibmm is giving an error. Which is defined in the Attachment please find the Attachment. and Give me a perfect result for this bug/error. (glibmm_err,34.81 KB, text/plain)
2008-08-13 10:40 UTC, Anand Ghaste
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Xake 2008-04-10 10:37:53 UTC
For some time I ran my desktop with a custom version of kevquinns overlay, but some things broke. So I wiped my install clean and restarted from a stage3 hardened 2008.0-beta1 tarball.
No overlays or otherwise changed toolchain.
Running ~x86 and some USE="flags alterations so both gcc and glibc has been rebuilt.

Reproducible: Always

Steps to Reproduce:
1. Clean install a 2008.1-beta1 hardened stage3 tarball
2. emerge world -uDN
3. emerge glibmm


Actual Results:  
 i686-pc-linux-gnu-g++ -DHAVE_CONFIG_H -DG_LOG_DOMAIN=\"glibmm\" -I../../glib -I../../glib -I../../glib -I../../glib -I../.. -I../../gio -I../../gio -I/usr/include/sigc++-2.0 -I/usr/lib/sigc++-2.0/include -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -pthread -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -march=pentium4 -pipe -O2 -fforce-addr -ggdb -Wall -Wno-long-long -MT module.lo -MD -MP -MF .deps/module.Tpo -c module.cc  -fPIC -DPIC -o .libs/module.o
{standard input}: Assembler messages:
{standard input}:3419: Warning: end of file not at end of a line; newline inserted
i686-pc-linux-gnu-g++: Internal error: Segmentation fault (program cc1plus)
Please submit a full bug report.
See <URL:http://bugs.gentoo.org/> for instructions.
make[5]: *** [keyfile.lo] Fel 1
make[5]: *** Inväntar oavslutade jobb...
mv -f .deps/module.Tpo .deps/module.Plo
mv -f .deps/markup.Tpo .deps/markup.Plo
make[5]: Leaving directory `/var/tmp/portage/dev-cpp/glibmm-2.16.1/work/glibmm-2.16.1/glib/glibmm'


Expected Results:  
glibmm should be merged without problems.

Portage 2.1.5_rc2 (hardened/linux/x86/2008.0/desktop, gcc-3.4.6, glibc-2.7-r2, 2.6.24-gentoo-r4 i686)
=================================================================
System uname: 2.6.24-gentoo-r4 i686 Intel(R) Pentium(R) 4 CPU 2.80GHz
Timestamp of tree: Wed, 09 Apr 2008 20:30:01 +0000
app-shells/bash:     3.2_p33
dev-lang/python:     2.5.1-r5
dev-python/pycrypto: 2.0.1-r6
sys-apps/baselayout: 2.0.0
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.61-r1
sys-devel/automake:  1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1
sys-devel/binutils:  2.18-r1
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.24
ACCEPT_KEYWORDS="x86 ~x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=pentium4 -pipe -O2 -fforce-addr -ggdb"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-march=pentium4 -pipe -O2 -fforce-addr -ggdb"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks metadata-transfer parallel-fetch sandbox sfperms splitdebug strict test unmerge-orphans userfetch"
GENTOO_MIRRORS="ftp://ftp.sunet.se/pub/os/Linux/distributions/gentoo"
LANG="sv"
LC_ALL="sv_SE.UTF-8"
LDFLAGS=""
LINGUAS="sv"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X a52 aac acl acpi alsa amr amrnb amrwb asf attr audioscrobbler avahi bash bash-completion berkdb bogofilter branding bzip2 cairo cdda cddb cdr cli consolekit cracklib crypt cups dbus device-mapper disk-partition divx dpms dri dts dvd dvdnav dvdr dvdread eds emboss encode evo evolution fam fat fbcondecor ffmpeg firefox flac fontconfig freetype ftp galago gcj gd gdbm gif gimp glitz gmedia gmp gnome gpm gsf gstreamer gtk gtk2 hal hardened hpn inotify ipv6 isdnlog jabber joystick jpeg kerberos keyring lcms ldap libnotify libsexy lm_sensors logrotate lzma lzo mad matroska midi mikmod mmx mng mp3 mpeg msn mudflap musepack musicbrainz ncurses network-cron networkmanager nfs nls nptl nptlonly ntp numeric obex offensive ogg opengl openmp pam pcre pdf perl pic pidgin png ppds pppd python qt3support quicktime readline reflection samba scanner sdl session spamassasin spell spl srt sse sse2 ssh ssl startup-notification subtitles svg syslog tcpd test theora tiff tracker truetype unicode urandom usb utf8 vorbis win32codecs wma wmf wmp x264 x86 xattr xcb xinerama xinetd xml xorg xv xvid zeroconf zlib" ALSA_CARDS="emu10k1 intel8x0 usb-audio" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="sv" USERLAND="GNU" VIDEO_CARDS="nouveau vesa nv"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 1 Xake 2008-04-10 10:54:11 UTC
Oooops.
Just saw that this was not the correct errormessage.

MAKEOPTS="-j1" LC_ALL="C" emerge -1 glibmm

 i686-pc-linux-gnu-g++ -DHAVE_CONFIG_H -DG_LOG_DOMAIN=\"glibmm\" -I../../glib -I../../glib -I../../glib -I../../glib -I../.. -I../../gio -I../../gio -I/usr/include/sigc++-2.0 -I/usr/lib/sigc++-2.0/include -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -pthread -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -march=pentium4 -pipe -O2 -fforce-addr -ggdb -Wall -Wno-long-long -MT iochannel.lo -MD -MP -MF .deps/iochannel.Tpo -c iochannel.cc  -fPIC -DPIC -o .libs/iochannel.o
mv -f .deps/iochannel.Tpo .deps/iochannel.Plo
/bin/sh ../../libtool --tag=CXX   --mode=compile i686-pc-linux-gnu-g++ -DHAVE_CONFIG_H -DG_LOG_DOMAIN=\"glibmm\"   -I../../glib -I../../glib -I../../glib -I../../glib -I../.. -I../../gio -I../../gio -I/usr/include/sigc++-2.0 -I/usr/lib/sigc++-2.0/include -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -pthread -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include      -march=pentium4 -pipe -O2 -fforce-addr -ggdb -Wall -Wno-long-long -MT keyfile.lo -MD -MP -MF .deps/keyfile.Tpo -c -o keyfile.lo keyfile.cc
 i686-pc-linux-gnu-g++ -DHAVE_CONFIG_H -DG_LOG_DOMAIN=\"glibmm\" -I../../glib -I../../glib -I../../glib -I../../glib -I../.. -I../../gio -I../../gio -I/usr/include/sigc++-2.0 -I/usr/lib/sigc++-2.0/include -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -pthread -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -march=pentium4 -pipe -O2 -fforce-addr -ggdb -Wall -Wno-long-long -MT keyfile.lo -MD -MP -MF .deps/keyfile.Tpo -c keyfile.cc  -fPIC -DPIC -o .libs/keyfile.o
i686-pc-linux-gnu-g++: Internal error: Segmentation fault (program cc1plus)
Please submit a full bug report.
See <URL:http://bugs.gentoo.org/> for instructions.
make[5]: *** [keyfile.lo] Error 1
make[5]: Leaving directory `/var/tmp/portage/dev-cpp/glibmm-2.16.1/work/glibmm-2.16.1/glib/glibmm'
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory `/var/tmp/portage/dev-cpp/glibmm-2.16.1/work/glibmm-2.16.1/glib/glibmm'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/var/tmp/portage/dev-cpp/glibmm-2.16.1/work/glibmm-2.16.1/glib'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/var/tmp/portage/dev-cpp/glibmm-2.16.1/work/glibmm-2.16.1/glib'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/dev-cpp/glibmm-2.16.1/work/glibmm-2.16.1'
make: *** [all] Error 2
{standard input}:  * 
Assembler messages:
{standard input}:3419:  * ERROR: dev-cpp/glibmm-2.16.1 failed.
Warning: end of file not at end of a line; newline inserted
 * Call stack:
 *               ebuild.sh, line   49:  Called src_compile
 *             environment, line  610:  Called gnome2_src_compile
 *             environment, line  544:  Called die
 * The specific snippet of code:
 *       emake || die "compile failure"
 *  The die message:
 *   compile failure
Comment 2 Rémi Cardona (RETIRED) gentoo-dev 2008-04-10 17:10:52 UTC
Hardened profile + funky CFLAGS ... I don't know where to begin :) Try toning your CFLAGS down first.

Thanks
Comment 3 Xake 2008-04-10 18:16:50 UTC
What funky CFLAGS?
The only change from the stage3 is s/mtune=i686/march=pentium4 and adding -ggdb.
-fforce-addr, -O2 and -pipe is specified in the makefile in the stage3

but I can try without -ggdb if that is what you like.
Comment 4 Xake 2008-04-10 18:26:24 UTC
Are these results better? Since I had no problems at all with kevquinns overlay before the reinstall I wonder if this is simply a GCC-3* issue more then hardened/CFLAGS.

rm /var/tmp/portage/* -rf && MAKEOPTS="-j1" LC_ALL="C" emerge -1 glibmm
<snip>

 i686-pc-linux-gnu-g++ -DHAVE_CONFIG_H -DG_LOG_DOMAIN=\"glibmm\" -I../../glib -I../../glib -I../../glib -I../../glib -I../.. -I../../gio -I../../gio -I/usr/include/sigc++-2.0 -I/usr/lib/sigc++-2.0/include -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -pthread -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -march=pentium4 -pipe -O2 -Wall -Wno-long-long -MT iochannel.lo -MD -MP -MF .deps/iochannel.Tpo -c iochannel.cc  -fPIC -DPIC -o .libs/iochannel.o
mv -f .deps/iochannel.Tpo .deps/iochannel.Plo
/bin/sh ../../libtool --tag=CXX   --mode=compile i686-pc-linux-gnu-g++ -DHAVE_CONFIG_H -DG_LOG_DOMAIN=\"glibmm\"   -I../../glib -I../../glib -I../../glib -I../../glib -I../.. -I../../gio -I../../gio -I/usr/include/sigc++-2.0 -I/usr/lib/sigc++-2.0/include -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -pthread -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include      -march=pentium4 -pipe -O2 -Wall -Wno-long-long -MT keyfile.lo -MD -MP -MF .deps/keyfile.Tpo -c -o keyfile.lo keyfile.cc
 i686-pc-linux-gnu-g++ -DHAVE_CONFIG_H -DG_LOG_DOMAIN=\"glibmm\" -I../../glib -I../../glib -I../../glib -I../../glib -I../.. -I../../gio -I../../gio -I/usr/include/sigc++-2.0 -I/usr/lib/sigc++-2.0/include -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -pthread -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -march=pentium4 -pipe -O2 -Wall -Wno-long-long -MT keyfile.lo -MD -MP -MF .deps/keyfile.Tpo -c keyfile.cc  -fPIC -DPIC -o .libs/keyfile.o
i686-pc-linux-gnu-g++: Internal error: Segmentation fault (program cc1plus)
Please submit a full bug report.
See <URL:http://bugs.gentoo.org/> for instructions.
make[5]: *** [keyfile.lo] Error 1
make[5]: Leaving directory `/var/tmp/portage/dev-cpp/glibmm-2.16.1/work/glibmm-2.16.1/glib/glibmm'
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory `/var/tmp/portage/dev-cpp/glibmm-2.16.1/work/glibmm-2.16.1/glib/glibmm'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/var/tmp/portage/dev-cpp/glibmm-2.16.1/work/glibmm-2.16.1/glib'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/var/tmp/portage/dev-cpp/glibmm-2.16.1/work/glibmm-2.16.1/glib'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/dev-cpp/glibmm-2.16.1/work/glibmm-2.16.1'
make: *** [all] Error 2
{standard input}: Assembler messages:
{standard input}:1508: Warning: end of file not at end of a line; newline inserted
 * 
 * ERROR: dev-cpp/glibmm-2.16.1 failed.
 * Call stack:
 *               ebuild.sh, line   49:  Called src_compile
 *             environment, line  614:  Called gnome2_src_compile
 *             environment, line  548:  Called die
 * The specific snippet of code:
 *       emake || die "compile failure"

Portage 2.1.5_rc2 (hardened/linux/x86/2008.0/desktop, gcc-3.4.6, glibc-2.7-r2, 2.6.24-gentoo-r4 i686)
=================================================================
System uname: 2.6.24-gentoo-r4 i686 Intel(R) Pentium(R) 4 CPU 2.80GHz
Timestamp of tree: Wed, 09 Apr 2008 20:30:01 +0000
app-shells/bash:     3.2_p33
dev-lang/python:     2.5.1-r5
dev-python/pycrypto: 2.0.1-r6
sys-apps/baselayout: 2.0.0
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.61-r1
sys-devel/automake:  1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1
sys-devel/binutils:  2.18-r1
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.24
ACCEPT_KEYWORDS="x86 ~x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=pentium4 -pipe -O2"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-march=pentium4 -pipe -O2"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks metadata-transfer parallel-fetch sandbox sfperms splitdebug strict test unmerge-orphans userfetch"
GENTOO_MIRRORS="ftp://ftp.sunet.se/pub/os/Linux/distributions/gentoo"
LANG="sv"
LC_ALL="sv_SE.UTF-8"
LDFLAGS=""
LINGUAS="sv"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/overlays/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X a52 aac acl acpi alsa amr amrnb amrwb applet asf attr audioscrobbler avahi bash bash-completion berkdb bogofilter branding bzip2 cairo cdda cddb cdr cli consolekit cracklib crypt cups dbus device-mapper disk-partition divx dpms dri dts dvd dvdnav dvdr dvdread eds emboss encode evo evolution fam fat fbcondecor ffmpeg firefox flac fontconfig freetype ftp galago gcj gd gdbm gedit gif gimp glitz gmedia gmp gnome gpm gsf gstreamer gtk gtk2 hal hardened hpn inotify ipv6 isdnlog jabber joystick jpeg kerberos keyring lcms ldap libnotify libsexy lm_sensors logrotate lzma lzo mad matroska midi mikmod mmx mng mp3 mpeg msn mudflap musepack musicbrainz nautilus ncurses network-cron networkmanager nfs nls nptl nptlonly ntp numeric obex offensive ogg opengl openmp pam pcre pdf perl pic pidgin png ppds pppd python qt3support quicktime readline reflection samba scanner sdl session spamassasin spell spl srt sse sse2 ssh ssl startup-notification subtitles svg syslog tcpd test theora tiff tracker truetype unicode urandom usb utf8 vorbis win32codecs wma wmf wmp x264 x86 xattr xcb xinerama xinetd xml xorg xv xvid zeroconf zlib" ALSA_CARDS="emu10k1 intel8x0 usb-audio" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="sv" USERLAND="GNU" VIDEO_CARDS="nouveau vesa nv"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS



Comment 5 Xake 2008-04-10 19:07:02 UTC
Ok, I should just keep my mouth shut.:-)

'gcc-config i686-pc-linux-gnu-3.4.6-hardenednossp && source/etc/profile && emerge -1 glibmm' merges fine. With the original CFLAGS. So apparently it is something in the SSP-system making g++ ICE.
Comment 6 Rémi Cardona (RETIRED) gentoo-dev 2008-04-11 22:57:48 UTC
If the Hardened project knows what's going on, because I sure as hell have no idea :)

Thanks
Comment 7 Gordon Malm (RETIRED) gentoo-dev 2008-06-20 19:34:15 UTC
Just hit this as well.  Looks like a similar gcc-3.4.6 issue as in bug #224031.  Within seconds: memory is saturated, machine becomes unresponsive, OOM killer starts making its best guesses.  Using -hardenednossp as suggested in Comment #5 works around the problem.

Portage 2.1.4.4 (hardened/x86/2.6, gcc-3.4.6, glibc-2.6.1-r0, 2.6.25-hardened-rc4-2008061001 i686)
=================================================================
System uname: 2.6.25-hardened-rc4-2008061001 i686 AMD Athlon(tm) 64 X2 Dual Core Processor 3800+
Timestamp of tree: Fri, 20 Jun 2008 17:45:01 +0000
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
app-shells/bash:     3.2_p33
dev-java/java-config: 1.3.7, 2.1.6
dev-lang/python:     2.4.4-r13
dev-python/pycrypto: 2.0.1-r6
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.61-r1
sys-devel/automake:  1.4_p6, 1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1
sys-devel/binutils:  2.18-r1
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.23-r3
ACCEPT_KEYWORDS="x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=athlon64 -msse3 -O2 -fweb -fomit-frame-pointer -fno-ident -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-march=athlon64 -msse3 -O2 -fweb -fomit-frame-pointer -fno-ident -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks parallel-fetch sandbox sfperms strict unmerge-orphans userfetch userpriv usersandbox"
GENTOO_MIRRORS="http://gentoo.mirrors.tds.net/gentoo/ http://gentoo.mirrors.easynews.com/linux/gentoo/ http://mirror.datapipe.net/gentoo/ http://gentoo.chem.wisc.edu/gentoo/ http://gentoo.netnitco.net/ http://gentoo.mirrors.pair.com/ http://open-systems.ufl.edu/mirrors/gentoo/"
LDFLAGS="-Wl,-O1"
LINGUAS="en en_US en_GB"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_EXTRA_OPTS="--progress --exclude-from=/etc/portage/rsync_excludes"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/portage/local/layman/sunrise /usr/portage/local/layman/trauma /usr/local/portage"
SYNC="rsync://*yoink*(private)/gentoo-portage"
USE="3dnow X Xaw3d a52 aac aalib acl acpi adns alsa apache2 apm audiofile bash-completion bcmath berkdb bidi blas bluetooth bzip2 cairo calendar canna caps cdb cdinstall cdparanoia cdr clamav cracklib crypt cscope ctype cups curl curlwrappers dba dbm dbus dbx dedicated dga dio directfb doc dri dts dv dvb dvd dvdr dvdread encode evo exif expat fam fastcgi fbcon ffmpeg fftw firefox flac flash flatfile foomaticdb fortran freetds freewnn ftp gb gcj gd gdbm geoip ggi gif ginac glut gmp gnome gnutls gphoto2 gpm gps graphviz gstreamer gtk gtk2 gtkhtml guile hal hardened iconv idn ieee1394 imagemagick imap imlib inifile ipv6 jack java javascript jbig jikes joystick jpeg jpeg2k junit kde ladspa lapack lash lcms ldap lesstif libcaca libg++ libgda libsamplerate libwww lirc lm_sensors logrotate lua mad maildir mailwrapper matroska mbox mcal mcve memlimit mhash midi mikmod mime mmap mmx mng mnogosearch mono motif mp3 mpeg mpi mplayer msession musepack nas ncurses neXt netboot netcdf nis nls nptl nptlonly nsplugin ocaml offensive ofx ogg openal opengl osc pam pcntl pcre pda pdf perl php pic plotutils png portaudio posix ppds python qdbm qt3 qt4 quicktime radius readline recode ruby samba sasl scanner sdl seamonkey session sharedext sharedmem shorten simplexml slang slp smartcard smp sndfile snmp soap sockets socks5 sox speex spell spl sqlite sqlite3 sse sse2 ssl startup-notification svg svga sysvipc szip tcl tcltk tcpd tetex theora threads tidy tiff timidity tk tokenizer truetype unicode urandom usb v4l vcd vhosts videos vorbis wavpack wddx wifi win32codecs wmf wxwindows x86 xcomposite xface xine xinerama xinetd xml xmlrpc xorg xosd xpm xprint xsl xv xvid yaz zeo zlib" ALSA_CARDS="au8820 ca0106 emu10k1" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse joystick" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en en_US en_GB" USERLAND="GNU" VIDEO_CARDS="apm dummy fbdev mga nv nvidia r128 trident v4l vesa vga"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS

MAKEOPTS="-j3":
i686-pc-linux-gnu-g++ -DHAVE_CONFIG_H -DG_LOG_DOMAIN=\"glibmm\" -I../../glib -I../../glib -I../../glib -I../../glib -I../.. -I../../gio -I../../gio -I/usr
/include/sigc++-2.0 -I/usr/lib/sigc++-2.0/include -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -pthread -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/
include -march=athlon64 -msse3 -O2 -fweb -fomit-frame-pointer -fno-ident -pipe -Wall -Wno-long-long -MT optioncontext.lo -MD -MP -MF .deps/optioncontext.Tp
o -c optioncontext.cc  -fPIC -DPIC -o .libs/optioncontext.o
i686-pc-linux-gnu-g++ -DHAVE_CONFIG_H -DG_LOG_DOMAIN=\"glibmm\" -I../../glib -I../../glib -I../../glib -I../../glib -I../.. -I../../gio -I../../gio -I/usr
/include/sigc++-2.0 -I/usr/lib/sigc++-2.0/include -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -pthread -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/
include -march=athlon64 -msse3 -O2 -fweb -fomit-frame-pointer -fno-ident -pipe -Wall -Wno-long-long -MT optionentry.lo -MD -MP -MF .deps/optionentry.Tpo -c
 optionentry.cc  -fPIC -DPIC -o .libs/optionentry.o
mv -f .deps/optionentry.Tpo .deps/optionentry.Plo
/bin/sh ../../libtool --tag=CXX   --mode=compile i686-pc-linux-gnu-g++ -DHAVE_CONFIG_H -DG_LOG_DOMAIN=\"glibmm\"   -I../../glib -I../../glib -I../../glib -
I../../glib -I../.. -I../../gio -I../../gio -I/usr/include/sigc++-2.0 -I/usr/lib/sigc++-2.0/include -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -pt
hread -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include      -march=athlon64 -msse3 -O2 -fweb -fomit-frame-pointer -fno-ident -pipe -Wall -Wno-long-long
-MT optiongroup.lo -MD -MP -MF .deps/optiongroup.Tpo -c -o optiongroup.lo optiongroup.cc
i686-pc-linux-gnu-g++ -DHAVE_CONFIG_H -DG_LOG_DOMAIN=\"glibmm\" -I../../glib -I../../glib -I../../glib -I../../glib -I../.. -I../../gio -I../../gio -I/usr
/include/sigc++-2.0 -I/usr/lib/sigc++-2.0/include -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -pthread -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/
include -march=athlon64 -msse3 -O2 -fweb -fomit-frame-pointer -fno-ident -pipe -Wall -Wno-long-long -MT optiongroup.lo -MD -MP -MF .deps/optiongroup.Tpo -c
 optiongroup.cc  -fPIC -DPIC -o .libs/optiongroup.o
i686-pc-linux-gnu-g++: Internal error: Killed (program cc1plus)
Please submit a full bug report.
See <URL:http://bugs.gentoo.org/> for instructions.
{standard input}: Assembler messages:
{standard input}:1476: Warning: end of file not at end of a line; newline inserted
{standard input}:2758: Error: suffix or operands invalid for `mov'
make[5]: *** [keyfile.lo] Error 1
make[5]: *** Waiting for unfinished jobs....
i686-pc-linux-gnu-g++: Internal error: Segmentation fault (program cc1plus)
Please submit a full bug report.
See <URL:http://bugs.gentoo.org/> for instructions.
{standard input}: Assembler messages:
{standard input}:0: Warning: end of file not at end of a line; newline inserted
make[5]: *** [optioncontext.lo] Error 1
{standard input}:29: Error: unrecognized symbol type ""
i686-pc-linux-gnu-g++: Internal error: Segmentation fault (program cc1plus)
Please submit a full bug report.
See <URL:http://bugs.gentoo.org/> for instructions.
make[5]: *** [optiongroup.lo] Error 1
make[5]: Leaving directory `/var/tmp/portage/dev-cpp/glibmm-2.16.1/work/glibmm-2.16.1/glib/glibmm'
{standard input}: Assembler messages:
{standard input}:1454: Warning: end of file not at end of a line; newline inserted
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory `/var/tmp/portage/dev-cpp/glibmm-2.16.1/work/glibmm-2.16.1/glib/glibmm'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/var/tmp/portage/dev-cpp/glibmm-2.16.1/work/glibmm-2.16.1/glib'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/var/tmp/portage/dev-cpp/glibmm-2.16.1/work/glibmm-2.16.1/glib'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/dev-cpp/glibmm-2.16.1/work/glibmm-2.16.1'
make: *** [all] Error 2

MAKEOPTS="-j1":
i686-pc-linux-gnu-g++ -DHAVE_CONFIG_H -DG_LOG_DOMAIN=\"glibmm\" -I../../glib -I../../glib -I../../glib -I../../glib -I../.. -I../../gio -I../../gio -I/usr/include/sigc++-2.0 -I/usr/lib/sigc++-2.0/include -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -pthread -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -march=athlon64 -msse3 -O2 -fweb -fomit-frame-pointer -fno-ident -pipe -Wall -Wno-long-long -MT iochannel.lo -MD -MP -MF .deps/iochannel.Tpo -c iochannel.cc  -fPIC -DPIC -o .libs/iochannel.o
mv -f .deps/iochannel.Tpo .deps/iochannel.Plo
/bin/sh ../../libtool --tag=CXX   --mode=compile i686-pc-linux-gnu-g++ -DHAVE_CONFIG_H -DG_LOG_DOMAIN=\"glibmm\"   -I../../glib -I../../glib -I../../glib -I../../glib -I../.. -I../../gio -I../../gio -I/usr/include/sigc++-2.0 -I/usr/lib/sigc++-2.0/include -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -pthread -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include      -march=athlon64 -msse3 -O2 -fweb -fomit-frame-pointer -fno-ident -pipe -Wall -Wno-long-long -MT keyfile.lo -MD -MP -MF .deps/keyfile.Tpo -c -o keyfile.lo keyfile.cc
i686-pc-linux-gnu-g++ -DHAVE_CONFIG_H -DG_LOG_DOMAIN=\"glibmm\" -I../../glib -I../../glib -I../../glib -I../../glib -I../.. -I../../gio -I../../gio -I/usr/include/sigc++-2.0 -I/usr/lib/sigc++-2.0/include -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -pthread -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -march=athlon64 -msse3 -O2 -fweb -fomit-frame-pointer -fno-ident -pipe -Wall -Wno-long-long -MT keyfile.lo -MD -MP -MF .deps/keyfile.Tpo -c keyfile.cc  -fPIC -DPIC -o .libs/keyfile.o
{standard input}: Assembler messages:
{standard input}:1476: Warning: end of file not at end of a line; newline inserted
i686-pc-linux-gnu-g++: Internal error: Segmentation fault (program cc1plus)
Please submit a full bug report.
See <URL:http://bugs.gentoo.org/> for instructions.
make[5]: *** [keyfile.lo] Error 1
make[5]: Leaving directory `/var/tmp/portage/dev-cpp/glibmm-2.16.1/work/glibmm-2.16.1/glib/glibmm'
{standard input}:2758: Error: suffix or operands invalid for `mov'
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory `/var/tmp/portage/dev-cpp/glibmm-2.16.1/work/glibmm-2.16.1/glib/glibmm'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/var/tmp/portage/dev-cpp/glibmm-2.16.1/work/glibmm-2.16.1/glib'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/var/tmp/portage/dev-cpp/glibmm-2.16.1/work/glibmm-2.16.1/glib'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/dev-cpp/glibmm-2.16.1/work/glibmm-2.16.1'
make: *** [all] Error 2
Comment 8 Gordon Malm (RETIRED) gentoo-dev 2008-06-20 19:36:23 UTC
*** Bug 226017 has been marked as a duplicate of this bug. ***
Comment 9 Francisco J. Sánchez 2008-06-25 08:52:49 UTC
same in x86_64 hardened multilib when running 'emerge -e world' but different compiler

# emerge --info

Portage 2.1.4.4 (hardened/amd64/multilib, gcc-3.4.6, glibc-2.6.1-r0, 2.6.23-hardened-r9 x86_64)
=================================================================
System uname: 2.6.23-hardened-r9 x86_64 AMD Athlon(tm)64 X2 Dual Core Processor 4800+
Timestamp of tree: Mon, 23 Jun 2008 22:01:01 +0000
app-shells/bash:     3.2_p33
dev-java/java-config: 1.3.7, 2.1.6
dev-lang/python:     2.5.2-r4
dev-python/pycrypto: 2.0.1-r6
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.61-r2
sys-devel/automake:  1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1
sys-devel/binutils:  2.18-r1
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.23-r3
ACCEPT_KEYWORDS="amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -fforce-addr"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config /var/bind /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-O2 -pipe -fforce-addr"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks metadata-transfer sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="ftp://ftp.belnet.be/mirror/rsync.gentoo.org/gentoo/ ftp://ftp.caliu.info/gentoo/ ftp://ftp.udc.es/gentoo/ "
LINGUAS="es es_ES"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X a52 aac alsa amd64 amuled apache2 arts berkdb bluetooth branding bzip2 calendar cli courier cracklib crypt ctype cups dri dvd dvdread ffmpeg firefox fortran gif gimp gimpprint glitz gnome gtk hal hardened hfs howl iconv imap java jpeg justify libwww mad maildir mbox midi mp3 mpeg multilib mysql nls nptl nptlonly nsplugin ogg opengl pam pcre pdf php pic png postfix ppds python quicktime readline remote resolvconf sasl sdl session spell sqlite ssl svg symlink tcpd theora tiff truetype udf unicode urandom usb v4l2 vhosts vorbis wmf xml xmlreader xorg xvid zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic auth_digest authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="mouse keyboard" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="es es_ES" USERLAND="GNU" VIDEO_CARDS="vesa fglrx"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, MAKEOPTS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY


# Error output:
/bin/sh ../../libtool --tag=CXX   --mode=compile x86_64-pc-linux-gnu-g++ -DHAVE_CONFIG_H -DG_LOG_DOMAIN=\"glibmm\"   -I../../glib -I../../glib -I../../glib -I../../glib -I../.. -I../../gio -I../../gio -I/usr/include/sigc++-2.0 -I/usr/lib64/sigc++-2.0/include -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include      -O2 -pipe -fforce-addr -Wall -Wno-long-long -MT keyfile.lo -MD -MP -MF .deps/keyfile.Tpo -c -o keyfile.lo keyfile.cc
 x86_64-pc-linux-gnu-g++ -DHAVE_CONFIG_H -DG_LOG_DOMAIN=\"glibmm\" -I../../glib -I../../glib -I../../glib -I../../glib -I../.. -I../../gio -I../../gio -I/usr/include/sigc++-2.0 -I/usr/lib64/sigc++-2.0/include -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -O2 -pipe -fforce-addr -Wall -Wno-long-long -MT keyfile.lo -MD -MP -MF .deps/keyfile.Tpo -c keyfile.cc  -fPIC -DPIC -o .libs/keyfile.o
x86_64-pc-linux-gnu-g++: Internal error: Killed (program cc1plus)



Comment 10 Francisco J. Sánchez 2008-06-25 09:00:46 UTC
The hardenednossp trick works.

Comment 11 Attila Tóth 2008-07-16 23:02:20 UTC
May I suggest to give https://hardened.gentooexperimental.org/secure/ a spin.
Improved gcc-4 ssp implementation seems to solve a bunch of problems for me on x86.

Regards,
Dw.
Comment 12 Anand Ghaste 2008-08-13 10:40:05 UTC
Created attachment 162813 [details]
While emergeing Gnome, glibmm is giving an error. Which is defined in the Attachment please find the Attachment. and Give me a perfect result for this bug/error.
Comment 13 Anand Ghaste 2008-08-13 10:43:58 UTC
Gentoo OS with Hardened-sources is a perfect system which we can built it as we want and as our need is.................


Thank you

Anand Ghaste
Network Computing Solutions 6G
Comment 14 Gordon Malm (RETIRED) gentoo-dev 2008-08-21 14:10:28 UTC
*** Bug 234888 has been marked as a duplicate of this bug. ***
Comment 15 Alex Efros 2009-01-15 08:19:18 UTC
Same issue here. Workaround works. Any ideas how to fix it?
Comment 16 Alex Efros 2009-01-15 10:00:10 UTC
I don't use Gnome, and hit this bug while trying to emerge vmware-workstation. Same bug happens not only with dev-cpp/glibmm-2.16.4, but also with dev-cpp/gtkmm-2.12.7, x11-libs/libview-0.6.2, dev-cpp/libsexymm-0.1.9 and dev-cpp/libgnomecanvasmm-2.22.0.
Comment 17 Attila Tóth 2009-01-15 11:54:21 UTC
(In reply to comment #15)
> Same issue here. Workaround works. Any ideas how to fix it?
> 

May I suggest to give https://hardened.gentooexperimental.org/secure/ a spin.
Improved gcc-4 ssp implementation seems to solve a bunch of problems for me on
x86.

Regards,
Dw.
Comment 18 jonas 2009-02-12 06:27:08 UTC
*** Bug 258354 has been marked as a duplicate of this bug. ***
Comment 19 solar (RETIRED) gentoo-dev 2009-04-13 14:02:00 UTC
Can somebody try appending -fno-stack-prottor to CFLAGS for the dev-cpp/glibmm pkg alone to see if it can be fixed in the tree that way. 
thanks in advance
Comment 20 Anders Hellgren gentoo-dev 2009-04-13 16:15:55 UTC
(In reply to comment #19)
> Can somebody try appending -fno-stack-prottor to CFLAGS for the dev-cpp/glibmm
> pkg alone to see if it can be fixed in the tree that way. 
> thanks in advance
> 

Adding inherit flag-o-matic and the following to the ebuild works with glibmm-2.16.4.

src_compile() {
        append-flags -fno-stack-protector

        gnome2_src_compile
}
Comment 21 Xake 2009-04-13 18:54:18 UTC
No, do not.
-fstack-protector may be broken in the patches, but that is not a reson to kill it for people using GCC4 where -fstack-protector works just because the hardened toolchain still is a bit behind.
Comment 22 Attila Tóth 2009-04-13 19:12:43 UTC
(In reply to comment #21)
> No, do not.
> -fstack-protector may be broken in the patches, but that is not a reson to kill
> it for people using GCC4 where -fstack-protector works just because the
> hardened toolchain still is a bit behind.
> 

It can be conditional for gcc-version -lt 4. Just like it was introduced for some packages already in the tree.

Dw.
Comment 23 solar (RETIRED) gentoo-dev 2009-04-13 19:56:51 UTC
(In reply to comment #21)
> No, do not.
> -fstack-protector may be broken in the patches, but that is not a reson to kill
> it for people using GCC4 where -fstack-protector works just because the
> hardened toolchain still is a bit behind.

This is a c++ based program. So it's all moot..
Comment 24 Xake 2009-04-14 03:53:37 UTC
or maybe not:

$ cat trivial2.cpp
#include <iostream>
#include <cstring>

int main(int argc, char* argv[])
{
    char buffer[16];

    if(argc > 1)
    {
        for(int index = 0; index < strlen(argv[1]);index++)
        {
            buffer[index] = argv[1][index];
        }
        std::cout << "Your first argument was: " << buffer << std::endl;
    }
    else
    {
        std::cout << "Usage: " << argv[0] << " ARG" << std::endl;   
    }
    return 0;
}


$ g++ -o trivial trivial2.cpp -fstack-protector -U_FORTIFY_SOURCE
$ ./trivial $(perl -e 'print "A"x100')
Your first argument was: AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA�wĿ;ץ�+�g
*** stack smashing detected ***: trivial - terminated
trivial: stack smashing attack in function <unknown> - terminated
Report to http://bugs.gentoo.org/
Avbruten (SIGABRT) (minnesutskrift skapad)

FORTIFY_SOURCE when used with c++ is moot, but it seems to me like that is not the case with -fstack-protector. This is using gcc-4.3.2, I do not know for which versions of gcc-4 it works.
Comment 25 solar (RETIRED) gentoo-dev 2009-04-14 04:34:48 UTC
Good catch. In that case yes. The check should be limited to <gcc-4
Comment 26 Gordon Malm (RETIRED) gentoo-dev 2009-10-14 00:56:17 UTC
GCC 4.3.4 is stable on hardened.  GCC 3.4.x is frozen/not being worked on. 
Closing as WONTFIX.