Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 358003 - x11-misc/xscreensaver-5.12-r1 segfaults when compiled with CFLAGS="-march=core2 -O2" with sys-devel/gcc-4.5.2 and sys-libs/glibc-2.13
Summary: x11-misc/xscreensaver-5.12-r1 segfaults when compiled with CFLAGS="-march=cor...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal
Assignee: Desktop Misc. Team
URL:
Whiteboard:
Keywords:
: 358303 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-03-09 00:48 UTC by Henry Gebhardt
Modified: 2011-03-15 17:33 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Henry Gebhardt 2011-03-09 00:48:23 UTC
Using CFLAGS="-march=native -O2 -pipe" causes xscreensaver to segfault on a core2 system, the reason being that the version string is set to NULL, so if "xscreensaver --help" shows (null) for the version, it is a clear indicator that it will segfault.

The problem goes a way when I recompile without the -march option, or reduce the optimization level.

Reproducible: Always

Steps to Reproduce:
1. CFLAGS="-march=core2 -O2" emerge =xscreensaver-5.12-r1
2. Run "xscreensaver-command -exit"
3. Run "xscreensaver"
Actual Results:  
Starting program: /usr/bin/xscreensaver 

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff628d2f1 in __strlen_sse2 () from /lib/libc.so.6
#0  0x00007ffff628d2f1 in __strlen_sse2 () from /lib/libc.so.6
#1  0x000000000040a986 in store_saver_id (ssi=0x6614a0) at windows.c:961
#2  initialize_screensaver_window_1 (ssi=0x6614a0) at windows.c:1340
#3  0x000000000040bc09 in initialize_screensaver_window (si=0x7fffffffd860)
    at windows.c:1368
#4  0x0000000000407990 in main (argc=1, argv=<value optimized out>)
    at ./xscreensaver.c:1455


Expected Results:  
Save the screen!

Portage 2.1.9.42 (default/linux/amd64/10.0/desktop/gnome, gcc-4.5.2, glibc-2.13-r1, 2.6.38-rc7+ x86_64)
=================================================================
                        System Settings
=================================================================
System uname: Linux-2.6.38-rc7+-x86_64-Intel-R-_Core-TM-2_Duo_CPU_L7500_@_1.60GHz-with-gentoo-2.0.1
Timestamp of tree: Tue, 08 Mar 2011 17:00:01 +0000
ccache version 3.1.4 [enabled]
app-shells/bash:     4.2_p7
dev-java/java-config: 2.1.11-r3
dev-lang/python:     2.7.1-r1, 3.1.3-r1
dev-util/ccache:     3.1.4
dev-util/cmake:      2.8.4
sys-apps/baselayout: 2.0.1-r1
sys-apps/openrc:     0.7.0
sys-apps/sandbox:    2.5
sys-devel/autoconf:  2.13, 2.68
sys-devel/automake:  1.8.5-r4, 1.10.3, 1.11.1
sys-devel/binutils:  2.21
sys-devel/gcc:       4.5.2
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.4-r1
sys-devel/make:      3.82
virtual/os-headers:  2.6.36.1 (sys-kernel/linux-headers)
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /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"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--with-bdeps y"
FEATURES="assume-digests binpkg-logs ccache distlocks fixlafiles fixpackages news parallel-fetch protect-owned sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS=""
GENTOO_MIRRORS="http://ftp.twaren.net/Linux/Gentoo/ ftp://gentoo.imj.fr/pub/gentoo/"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en en_US de"
MAKEOPTS="-j2"
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="/var/lib/layman/sunrise /var/lib/layman/science /var/lib/layman/mozilla /var/lib/layman/lxde /var/lib/layman/sage-on-gentoo /var/lib/layman/haskell /usr/local/portage/systemd /usr/local/portage/kork"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X a52 aac acct acpi alsa amd64 archive aspell autoipd avahi bash-completion berkdb bluetooth branding bzip2 cairo cdr cli consolekit cracklib cscope cups cxx data dbus dns dri dts dvd dvdr dvi emboss encode evo exif faac faad fam fat fbcon ffmpeg firefox flac fontconfig fortran fortune gdbm gdu gif git gmp gnome gnome-keyring gpm graphics gsm gstreamer gtk h323 hdaps hddtemp humanities iconv imap inotify iplayer ipv6 ipython irc ithreads jabber jingle jpeg kpathsea laptop latex lcms libnotify lm_sensors mad mdnsresponder-compat mikmod mmx mmxext mng modules mp3 mp4 mpeg mpi mudflap multilib ncurses networkmanager nls nntp normalize nptl nptlonly nsplugin ogg opengl openmp optimization pam pango pari24 pcre pdf perl pipechan png policykit portaudio ppds pppd pstricks python qt3support readline replaygain sage science sdl session sip smp spell sse sse2 ssl ssse3 startup-notification subversion svg sysfs systemd tcpd theora thinkpad threads tiff tk truetype udev unicode usb v4l2 vim-pager vim-syntax vim-with-x vorbis wav webkit wicd wifi wimax x264 xcb xcomposite xetex xinerama xml xorg xpm xrandr xulrunner xv xvid xvmc 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 cgi cgid 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" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en en_US de" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="intel fbdev vesa" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" 
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

=================================================================
                        Package Settings
=================================================================

x11-misc/xscreensaver-5.12-r1 was built with the following:
USE="jpeg (multilib) opengl pam xinerama -new-login -suid"
CFLAGS="-march=core2 -O2 -ggdb"


This also happens with xscreensaver-5.12, but only now, after an emerge -vDuN world, but gcc was not part of that upgrade.

Ha! Just noticed: x11-libs/libXt-1.1.0 was part of the upgrade, and downgrading to libXt-1.0.9 fixes the problem!
Comment 1 Henry Gebhardt 2011-03-12 12:55:17 UTC
Interestingly, this bug disappears when applying the patch from bug #358263 to x11-libs/libXt-1.1.0.
Comment 2 Henry Gebhardt 2011-03-12 13:16:14 UTC
This is also fixed with libXt-1.1.1, and libXt-1.1.0 is gone, so I am closing this bug. Thank you.
Comment 3 Ivan Trombley 2011-03-15 17:33:51 UTC
*** Bug 358303 has been marked as a duplicate of this bug. ***