When compiled on amd64 with the -fstack-protector flag, wesnoth crashes at the end of a scenario with a stack smashing attack message on the terminal (I forgot to copy down the exact message, but it occurs in the function "LEVEL_RESULT play_level(game_data&, config&, config*, CVideo&, game_state&, std::vector<config*>&)"). The problem /doesn't/ occur in a 32bit chroot on the same machine. Reproducible: Always Steps to Reproduce: 1. On an amd64 system: CFLAGS="-fstack-protector ..." emerge wesnoth 2. Run "wesnoth", choose the "Tutorial" menu item and play through the first scenario. 3. Actual Results: Games crashes with "stack smashing" message. Expected Results: Continue to the next scenario in the tutorial. Portage 2.0.51.19 (default-linux/amd64/2005.0, gcc-3.4.3, glibc-2.3.4.20041102-r1, 2.6.11-gentoo-r6 x86_64) ================================================================= System uname: 2.6.11-gentoo-r6 x86_64 AMD Athlon(tm) 64 Processor 3000+ Gentoo Base System version 1.4.16 Python: dev-lang/python-2.3.4-r1 [2.3.4 (#2, Mar 1 2005, 21:38:17)] ccache version 2.3 [enabled] dev-lang/python: 2.3.4-r1 sys-devel/autoconf: 2.59-r6, 2.13 sys-devel/automake: 1.7.9-r1, 1.8.5-r3, 1.5, 1.4_p6, 1.6.3, 1.9.4 sys-devel/binutils: 2.15.92.0.2-r7 sys-devel/libtool: 1.5.14 virtual/os-headers: 2.6.8.1-r4 ACCEPT_KEYWORDS="amd64" AUTOCLEAN="yes" CFLAGS="-march=athlon64 -pipe -fomit-frame-pointer -O2" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /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/lib/X11/xkb /usr/lib/mozilla/defaults/pref /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=athlon64 -pipe -fomit-frame-pointer -O2" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs autoconfig ccache distlocks sandbox" GENTOO_MIRRORS="ftp://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ ftp://mirrors.sec.informatik.tu-darmstadt.de/gentoo/ http://ftp.du.se/pub/os/gentoo http://ftp.easynet.nl/mirror/gentoo/" LINGUAS="en_GB" MAKEOPTS="" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="amd64 X aalib acl acpi alsa apache2 arts avi berkdb bitmap-fonts cairo cdr crypt cups curl dvd esd fam flac font-serverfortran gdbm ggi gif gtk gtk2 imagemagick imlib ipv6 java jp2 jpeg junit kde lcms leim libcaca libwww lzw lzw-tiff mad mikmod mng motif mozilla mp3 mpeg ncurses nls nptl nptlonly ogg opengl pam pdflib perl png postgres python qt readline samba sdl speex ssl tcltk tcpd tetex theora tiff timidity truetype truetype-fonts type1-fonts usb userlocales vorbis xml2 xmms xpm xrandr xv zlib linguas_en_GB" Unset: ASFLAGS, CBUILD, CTARGET, LANG, LC_ALL, LDFLAGS
filtered.
umm, chances are the game is broken so filtering stack-protector is a dumb idea ...
Not filtered in 0.9.5 on x86 and gives the same problem.
linked to the upstream bug.
Ok, I confirmed the issue on x86 and talked at length with upstream about this. Their take on it is that it is purely a gcc-3 issue and that there is actually no stack problems. They say that gcc-4 doesn't have a problem with the code. I've filtered out the flag for gcc-3 in CVS. resync/remerge to get it if you have -fstack-protector in your CXXFLAGS. No rev bump to save a compile for all the rest of the people out there without that flag enabled. Thanks for the bug report. (and thanks to the upstream devs for their patience)