After upgrading to GCC 4.4.0-r1 and recompiling the system with -O3 -march=barcelona a number of packages got broken. Wine used to work with these flags, but doesn't any more. I have confirmed that wine-1.1.20, wine-1.1.25 and wine-1.1.26 stop working with the error below if compiled using GCC 4.4.0-r1 but work perfectly fine if compiled using GCC-4.3.3-r2. The compilation itself goes smoothly and without any problems, but the binaries are useless -- they still work in the sense that they are capable of producing an error, but simply won't be able to run any program. I am setting severity to major because it might be that there is either a subtle but important bug in GCC or something weird happens in Wine. Reproducible: Always Steps to Reproduce: 1. emerge wine with gcc 4.4.0-r1 using CFLAGS -O3 -march=barcelona, but I guess any AMD64 MARCH would work 2. run something under wine (example below: EditPlus 3.11) Actual Results: wine: Unhandled page fault on read access to 0xffffffff at address 0x7ecef934 (thread 0027), starting debugger... Unhandled exception: page fault on read access to 0xffffffff in 32-bit code (0x7ecef934). Register dump: CS:0023 SS:002b DS:002b ES:002b FS:0063 GS:006b EIP:7ecef934 ESP:0032f5e4 EBP:0032f69c EFLAGS:00010212( R- -- I -A- - ) EAX:0032f670 EBX:7ed0aff4 ECX:000003ce EDX:0032f680 ESI:0032f760 EDI:7e1cb16e Stack dump: 0x0032f5e4: 0032f65c 7ed29570 7ed05f2a 7ed05f12 0x0032f5f4: 0032f6fc 00000400 7effebd3 0032f630 0x0032f604: f7d244d3 f7da7ff4 f7ccb673 0000000f 0x0032f614: f7def000 00001000 7c48934c 7c4892b8 0x0032f624: f7da7ff4 7c4892b8 00000002 0032f678 0x0032f634: 0032f670 0032f680 7c489478 0032f6fc Backtrace: =>0 0x7ecef934 in user32 (+0xcf934) (0x0032f69c) 1 0x7ecf0017 wsprintfW+0x17() in user32 (0x0032f6bc) 2 0x7e1c34d6 ImmGetIMEFileNameW+0x36() in imm32 (0x0032f79c) 3 0x7e1c36c7 in imm32 (+0x136c7) (0x0032fb3c) 4 0x7e1c80cf ImmCreateContext+0x4f() in imm32 (0x0032fb8c) 5 0x7e1c84bd ImmGetContext+0x17d() in imm32 (0x0032fbcc) 6 0x7e373c9f IME_UpdateAssociation+0x1f() in winex11 (0x0032fbfc) 7 0x7e3aa596 in winex11 (+0x7a596) (0x0032fc9c) 8 0x7e3aad1a in winex11 (+0x7ad1a) (0x0032fccc) 9 0x7e39d9f5 x11drv_init_thread_data+0x1f5() in winex11 (0x0032fd7c) 10 0x7e37d858 X11DRV_GetCursorPos+0x18() in winex11 (0x0032fddc) 11 0x7ec7f8e7 GetCursorPos+0x27() in user32 (0x0032fdfc) 12 0x004f4a08 in editplus (+0xf4a08) (0x0032fe28) 13 0x004f42fd in editplus (+0xf42fd) (0x0032fe4c) 14 0x0040d2bc in editplus (+0xd2bc) (0x0032fef8) 15 0x7ede20df in kernel32 (+0x620df) (0x0032ffe8) 16 0xf7df953d wine_call_on_stack+0x1d() in libwine.so.1 (0x00000000) 0x7ecef934: Modules: Module Address Debug info Name (69 modules) PE 400000- 5a7000 Export editplus ELF 7bf00000-7bf04000 Deferred <wine-loader> ELF 7e08b000-7e0ba000 Deferred libcups.so.2 ELF 7e0e5000-7e0ff000 Deferred spoolss<elf> \-PE 7e0f0000-7e0ff000 \ spoolss ELF 7e0ff000-7e11e000 Deferred localspl<elf> \-PE 7e100000-7e11e000 \ localspl ELF 7e14f000-7e183000 Deferred uxtheme<elf> \-PE 7e160000-7e183000 \ uxtheme ELF 7e183000-7e18d000 Deferred libxcursor.so.1 ELF 7e18d000-7e193000 Deferred libxfixes.so.3 ELF 7e193000-7e197000 Deferred libxcomposite.so.1 ELF 7e197000-7e19e000 Deferred libxrandr.so.2 ELF 7e19e000-7e1a7000 Deferred libxrender.so.1 ELF 7e1a7000-7e1ad000 Deferred libxxf86vm.so.1 ELF 7e1ad000-7e1cf000 Export imm32<elf> \-PE 7e1b0000-7e1cf000 \ imm32 ELF 7e1cf000-7e1d5000 Deferred libxdmcp.so.6 ELF 7e1d5000-7e1d9000 Deferred libxau.so.6 ELF 7e1d9000-7e2c5000 Deferred libx11.so.6 ELF 7e2c5000-7e2d4000 Deferred libxext.so.6 ELF 7e2d4000-7e2ec000 Deferred libice.so.6 ELF 7e2ec000-7e2f5000 Deferred libsm.so.6 ELF 7e320000-7e3d2000 Export winex11<elf> \-PE 7e330000-7e3d2000 \ winex11 ELF 7e484000-7e4a5000 Deferred libexpat.so.1 ELF 7e4a5000-7e4cf000 Deferred libfontconfig.so.1 ELF 7e4cf000-7e4e2000 Deferred libz.so.1 ELF 7e4e2000-7e562000 Deferred libfreetype.so.6 ELF 7e58d000-7e5fd000 Deferred rpcrt4<elf> \-PE 7e5a0000-7e5fd000 \ rpcrt4 ELF 7e5fd000-7e703000 Deferred ole32<elf> \-PE 7e620000-7e703000 \ ole32 ELF 7e703000-7e72d000 Deferred oledlg<elf> \-PE 7e710000-7e72d000 \ oledlg ELF 7e72d000-7e765000 Deferred winspool<elf> \-PE 7e730000-7e765000 \ winspool ELF 7e765000-7e7c7000 Deferred shlwapi<elf> \-PE 7e770000-7e7c7000 \ shlwapi ELF 7e7c7000-7e95b000 Deferred shell32<elf> \-PE 7e7e0000-7e95b000 \ shell32 ELF 7e95b000-7ea0f000 Deferred comdlg32<elf> \-PE 7e960000-7ea0f000 \ comdlg32 ELF 7ea0f000-7ea23000 Deferred lz32<elf> \-PE 7ea10000-7ea23000 \ lz32 ELF 7ea23000-7eaf9000 Deferred comctl32<elf> \-PE 7ea30000-7eaf9000 \ comctl32 ELF 7eaf9000-7eb53000 Deferred advapi32<elf> \-PE 7eb10000-7eb53000 \ advapi32 ELF 7eb53000-7ec03000 Deferred gdi32<elf> \-PE 7eb60000-7ec03000 \ gdi32 ELF 7ec03000-7ed64000 Export user32<elf> \-PE 7ec20000-7ed64000 \ user32 ELF 7ed64000-7eecf000 Export kernel32<elf> \-PE 7ed80000-7eecf000 \ kernel32 ELF 7eecf000-7eedb000 Deferred libnss_files.so.2 ELF 7eedb000-7eef2000 Deferred libnsl.so.1 ELF 7eef2000-7ef19000 Deferred libm.so.6 ELF 7ef29000-7ef44000 Deferred version<elf> \-PE 7ef30000-7ef44000 \ version ELF 7ef44000-7f000000 Deferred ntdll<elf> \-PE 7ef60000-7f000000 \ ntdll ELF f7c51000-f7c5c000 Deferred libnss_nis.so.2 ELF f7c5e000-f7c62000 Deferred libdl.so.2 ELF f7c62000-f7dac000 Deferred libc.so.6 ELF f7dac000-f7dc5000 Deferred libpthread.so.0 ELF f7dc7000-f7dd0000 Deferred libnss_compat.so.2 ELF f7df0000-f7f2e000 Export libwine.so.1 ELF f7f2f000-f7f4e000 Deferred ld-linux.so.2 Threads: process tid prio (all id:s are in hex) 0000000e 00000014 0 00000010 0 0000000f 0 00000011 00000017 0 00000013 0 00000012 0 0000001c 0000001d 0 0000001e 0000001f 0 00000026 (D) C:\Program Files\EditPlus 3\editplus.exe 00000027 0 <== Backtrace: =>0 0x7ecef934 in user32 (+0xcf934) (0x0032f69c) 1 0x7ecf0017 wsprintfW+0x17() in user32 (0x0032f6bc) 2 0x7e1c34d6 ImmGetIMEFileNameW+0x36() in imm32 (0x0032f79c) 3 0x7e1c36c7 in imm32 (+0x136c7) (0x0032fb3c) 4 0x7e1c80cf ImmCreateContext+0x4f() in imm32 (0x0032fb8c) 5 0x7e1c84bd ImmGetContext+0x17d() in imm32 (0x0032fbcc) 6 0x7e373c9f IME_UpdateAssociation+0x1f() in winex11 (0x0032fbfc) 7 0x7e3aa596 in winex11 (+0x7a596) (0x0032fc9c) 8 0x7e3aad1a in winex11 (+0x7ad1a) (0x0032fccc) 9 0x7e39d9f5 x11drv_init_thread_data+0x1f5() in winex11 (0x0032fd7c) 10 0x7e37d858 X11DRV_GetCursorPos+0x18() in winex11 (0x0032fddc) 11 0x7ec7f8e7 GetCursorPos+0x27() in user32 (0x0032fdfc) 12 0x004f4a08 in editplus (+0xf4a08) (0x0032fe28) 13 0x004f42fd in editplus (+0xf42fd) (0x0032fe4c) 14 0x0040d2bc in editplus (+0xd2bc) (0x0032fef8) 15 0x7ede20df in kernel32 (+0x620df) (0x0032ffe8) 16 0xf7df953d wine_call_on_stack+0x1d() in libwine.so.1 (0x00000000) Expected Results: Cleanly running program. Portage 2.1.6.13 (default/linux/amd64/2008.0, gcc-4.3.3, glibc-2.10.1-r0, 2.6.30 x86_64) ================================================================= System uname: Linux-2.6.30-x86_64-Quad-Core_AMD_Opteron-tm-_Processor_2382-with-gentoo-2.0.1 Timestamp of tree: Mon, 20 Jul 2009 20:00:03 +0000 app-shells/bash: 4.0_p24 dev-java/java-config: 2.1.8-r1 dev-lang/python: 2.5.4-r2, 2.6.2-r1 dev-util/cmake: 2.6.4-r1 sys-apps/baselayout: 2.0.1 sys-apps/openrc: 0.4.3-r3 sys-apps/sandbox: 2.0 sys-devel/autoconf: 2.13, 2.63-r1 sys-devel/automake: 1.5, 1.8.5-r3, 1.9.6-r2, 1.10.2, 1.11 sys-devel/binutils: 2.19.1-r1 sys-devel/gcc-config: 1.4.1 sys-devel/libtool: 2.2.6a virtual/os-headers: 2.6.30 ACCEPT_KEYWORDS="amd64 ~amd64" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O3 -pipe -march=barcelona" 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/lib/hsqldb" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c /etc/udev/rules.d" CPPFLAGS="-O3 -pipe -march=barcelona" CXXFLAGS="-O3 -pipe -march=barcelona" DISTDIR="/usr/portage/distfiles" FEATURES="distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch" FFLAGS="-O3 -pipe -march=barcelona" GENTOO_MIRRORS="ftp://gentoo.llarian.net/pub/gentoo" LDFLAGS="-Wl,-O1" LINGUAS="en pl" MAKEOPTS="-j10" PKGDIR="/usr/portage/packages" PORTAGE_CONFIGROOT="/" 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/portage/layman/science /usr/local/portage/odra" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="3dnow 3dnowext X aac aalib acl acml acpi acpiu alsa amd64 amrnb amrwb apm aspell async audacious bash-completion berkdb blas boost bzip2 cairo cdparanoia cleartype cli corefonts cracklib crypt cups curl cxx dbus dga divx djvu dri dts dvd dvdread enca encode encoder equalizer expat ffmpeg fftw fontconfig fortran fpx gcj gd gdbm gfortran ggi gif git glib gmp gnutls gpm gpu graphite graphviz gs gsl gtk hdri heterogeneous iconv icu imagemagick imlib isdnlog java jpeg jpg lapack latex lcms ldap libcaca libssh2 live lm_sensors lua lzo mad metis midi mmx mmxext mng mp3 mpeg2 mpfr mpi mplayer mudflap multilib mysql nas ncurses network nforce2 nls nptl nptlonly nsplugin numpy nut nvidia objc objc++ ogg openexr opengl openmp openssl pam parmetis patented pch pcre pdf perl php plotutils pmu png pnm povray ppds pppd python qhull qt3 qt3support qt4 quicktime radio rar readline reflection rtc samba schroedinger sensord server session shaders slp smp sms sparse speex spell spl sqlite sse sse2 sse3 ssh ssl ssse3 subversion svg svn swat sysfs syslog tcl tcpd tga threads tiff tk tls truetype umfpack unicode vdpau vim-syntax vmd voice vorbis vtk webkit wma wmf wxwidgets wxwindows x264 xcomposite xemacs xml xorg xulrunner xvid zeroconf zlib" ALSA_CARDS="hda_intel" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul 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" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en pl" USERLAND="GNU" VIDEO_CARDS="nvidia" Unset: CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
As an additional comment, compiling with GCC 4.4.0-r1 and restricting CFLAGS to -O2 -march=barcelona solves the problem. Maybe some weird optimization flag got included into -O3 that wasn't there before?
Works fine here on amd64 Portage 2.2_rc36 (default/linux/amd64/2008.0/desktop, gcc-4.4.1, glibc-2.10.1-r0, 2.6.30.4 x86_64) ================================================================= System uname: Linux-2.6.30.4-x86_64-Intel-R-_Core-TM-_i7_CPU_920_@_2.67GHz-with-gentoo-2.0.1 Timestamp of tree: Fri, 07 Aug 2009 20:00:01 +0000 ccache version 2.4 [enabled] app-shells/bash: 4.0_p28 dev-java/java-config: 2.1.8-r1 dev-lang/python: 2.6.2-r1, 3.1 dev-util/ccache: 2.4-r8 dev-util/cmake: 2.6.4-r2 sys-apps/baselayout: 2.0.1 sys-apps/openrc: 0.4.3-r3 sys-apps/sandbox: 2.0 sys-devel/autoconf: 2.13, 2.63-r1 sys-devel/automake: 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2, 1.11 sys-devel/binutils: 2.19.1-r1 sys-devel/gcc-config: 1.4.1 sys-devel/libtool: 2.2.6a virtual/os-headers: 2.6.30-r1 ACCEPT_KEYWORDS="amd64 ~amd64" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=native -O3 -msse4 -mmmx -floop-interchange -floop-strip-mine -floop-block -pipe" 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/lib/hsqldb" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c /etc/udev/rules.d" CXXFLAGS="-march=native -O3 -msse4 -mmmx -floop-interchange -floop-strip-mine -floop-block -pipe" DISTDIR="/usr/portage/distfiles" EMERGE_DEFAULT_OPTS="--jobs --load-average=8 --keep-going" FEATURES="assume-digests ccache distlocks fixpackages metadata-transfer parallel-fetch preserve-libs protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch" GENTOO_MIRRORS="http://ftp6.uni-erlangen.de/pub/mirrors/gentoo http://gentoo.binarycompass.org http://ftp.snt.ipv6.utwente.nl/pub/os/linux/gentoo/ http://gentoo.osuosl.org/ http://gentoo.chem.wisc.edu/gentoo/" LDFLAGS="-Wl,-O1" LINGUAS="en" MAKEOPTS="-j8" PKGDIR="/usr/portage/packages" PORTAGE_CONFIGROOT="/" 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/portage/layman/science /usr/local/portage/layman/nx /usr/local/portage/layman/berkano /usr/local/portage/layman/kde-testing /usr/local/portage/layman/qting-edge /usr/local/portage/layman/haskell /usr/local/portage/layman/pcsx2 /usr/local/portage/layman/sunrise /usr/local/portage/layman/pro-audio /usr/local/portage/layman/jokey /usr/local/portage/layman/x11 /usr/local/portage/layman /usr/local/portage/custom" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="X aac acl acpi addressbook aiglx alsa alsa-lib amd64 apache2 apm audacious autoipd avahi bash-completion bonjour branding bzip2 cairo cdaudio cdparanoia cdr cli consolekit cracklib crypt css cups daap dbus dri dssi dvd dvdr eds emboss encode esd evo exif fam fbdev ffmpeg firefox flac fortran frost fuse gdbm gif gimp glib glitz gnutls gphoto2 gpm graphite gstreamer gtk hal haskell hscolour htmlhandbook iconv imagemagick isdnlog jack joystick jpeg kde kde4 kdrive lapack ldap lensfun libnotify libsamplerate lm_sensors mad midi mikmod mmx mng moonlight mp3 mpeg mudflap multilib mysql nano-syntax ncurses netjack networkmanager nls nptl nptlonly nsplugin ntp ogg openexr opengl openmp pam pcre pdf perl phonon plasma plotutils pmu png policykit ppds pppd python qt3support qt4 quicktime raster raw readline reflection rtc samba sdl semantic-desktop session smp spell spl sql sse sse2 sse3 sse4 sse4.1 sse4.2 ssl ssse3 startup-notification svg sysfs tcpd theora tiff truetype tunepimp unicode usb vorbis webkit xcomposite xine xml xorg xulrunner xv xvid xvmc zeroconf 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 mmap_emul 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="en" USERLAND="GNU" VIDEO_CARDS="radeon vesa" Unset: CPPFLAGS, CTARGET, FFLAGS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
I had the same problem as the reporter, and found that adding -fno-tree-vectorize (in addition to -O3) fixed it for me. Alternatively, using -O2 -ftree-vectorize causes it to crash.
restored the strip-flags behind USE=custom-flags