Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 317603 - Apps linked to sys-libs/zlib crash when zlib is compiled with gcc 4.4.3
Summary: Apps linked to sys-libs/zlib crash when zlib is compiled with gcc 4.4.3
Status: RESOLVED DUPLICATE of bug 270120
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-04-28 08:03 UTC by Mark R. Pariente
Modified: 2010-04-28 08:15 UTC (History)
0 users

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 Mark R. Pariente 2010-04-28 08:03:27 UTC
I switched to using gcc 4.4.3 (from 4.3.4) to test it out, did emerge -uDN world and firefox started to crash on startup. Here is the backtrace from firefox (no debug symbols):

#0  0xb654736e in ?? () from /lib/libz.so.1
#1  0xb65463b1 in inflate () from /lib/libz.so.1
#2  0xb5c08520 in png_read_row () from /usr/lib/libpng12.so.0
#3  0xb5c08a74 in png_read_image () from /usr/lib/libpng12.so.0
#4  0xb24a5caf in ?? () from /usr/lib/gtk-2.0/2.10.0/loaders/libpixbufloader-png.so
#5  0xb5e11edc in ?? () from /usr/lib/libgdk_pixbuf-2.0.so.0
#6  0xb5e13100 in gdk_pixbuf_new_from_file () from /usr/lib/libgdk_pixbuf-2.0.so.0
#7  0xb74a7199 in ?? () from /usr/lib/xulrunner-1.9.2/libxul.so
#8  0xb74a9ac9 in ?? () from /usr/lib/xulrunner-1.9.2/libxul.so
#9  0xb74a7141 in ?? () from /usr/lib/xulrunner-1.9.2/libxul.so
#10 0xb74b121a in ?? () from /usr/lib/xulrunner-1.9.2/libxul.so
#11 0xb733d575 in ?? () from /usr/lib/xulrunner-1.9.2/libxul.so
#12 0xb733b768 in ?? () from /usr/lib/xulrunner-1.9.2/libxul.so
#13 0xb733b946 in ?? () from /usr/lib/xulrunner-1.9.2/libxul.so
#14 0xb734cbaa in ?? () from /usr/lib/xulrunner-1.9.2/libxul.so
#15 0xb730d40c in ?? () from /usr/lib/xulrunner-1.9.2/libxul.so
#16 0xb730d99c in ?? () from /usr/lib/xulrunner-1.9.2/libxul.so
#17 0xb75a76bb in NS_InvokeByIndex_P () from /usr/lib/xulrunner-1.9.2/libxul.so
#18 0xb6b801d7 in ?? () from /usr/lib/xulrunner-1.9.2/libxul.so
#19 0xb6b870c5 in ?? () from /usr/lib/xulrunner-1.9.2/libxul.so
#20 0xb78da9b0 in js_Invoke () from /usr/lib/xulrunner-1.9.2/libmozjs.so
#21 0xb78cc71b in ?? () from /usr/lib/xulrunner-1.9.2/libmozjs.so
#22 0xb78daca1 in js_Invoke () from /usr/lib/xulrunner-1.9.2/libmozjs.so
#23 0xb6b7ba89 in ?? () from /usr/lib/xulrunner-1.9.2/libxul.so
#24 0xb6b759bd in ?? () from /usr/lib/xulrunner-1.9.2/libxul.so
#25 0xb75a8225 in ?? () from /usr/lib/xulrunner-1.9.2/libxul.so
#26 0xb734a94b in ?? () from /usr/lib/xulrunner-1.9.2/libxul.so
#27 0xb734af09 in ?? () from /usr/lib/xulrunner-1.9.2/libxul.so
#28 0xb734afed in ?? () from /usr/lib/xulrunner-1.9.2/libxul.so
#29 0xb6b4c1bf in XRE_main () from /usr/lib/xulrunner-1.9.2/libxul.so
#30 0x0804a080 in ?? ()
#31 0xb7c90bb6 in __libc_start_main () from /lib/libc.so.6
#32 0x08049961 in ?? ()

Based on this backtrace I tried to downgrade zlib versions, zlib-1.2.5 and zlib-1.2.4 also produced the same crash. I also tried recompiling gtk+, xulrunner and mozilla-firefox and none of these helped.

Then after a bit of googling I ran into the following bug in the gcc bugzilla:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32893

I also have -msse2 in my CFLAGS, and this bug made me realize that the compiler switch might have caused the issue. I rolled back to gcc 4.3.4, recompiled zlib, and voila, no crash on firefox startup.

So to summarize, the combination of gcc 4.4.3 and the CFLAGS I'm using is causing zlib linked apps to crash (I could only reproduce this with firefox, tried gimp and a few others but didn't observe a crash).

Reproducible: Always

Steps to Reproduce:
1. Compile zlib-1.2.5-r1 with gcc-4.4.3-r2 using "-O3 -msse2"
2. Launch mozilla-firefox (built against xulrunner, not firefox-bin)


Actual Results:  
Firefox crashes on startup

Expected Results:  
Firefox launches without crash

Here is my emerge --info:
Portage 2.1.8.3 (default/linux/x86/10.0, gcc-4.4.3, glibc-2.11.1-r0, 2.6.33-gentoo i686)
=================================================================
System uname: Linux-2.6.33-gentoo-i686-Intel-R-_Core-TM-2_CPU_6700_@_2.66GHz-with-gentoo-2.0.1
Timestamp of tree: Wed, 28 Apr 2010 05:30:02 +0000
ccache version 2.4 [disabled]
app-shells/bash:     4.1_p5
dev-java/java-config: 2.1.10
dev-lang/python:     2.6.5-r1, 3.1.2-r2
dev-python/pycrypto: 2.1.0
dev-util/ccache:     2.4-r8
dev-util/cmake:      2.8.1-r1
sys-apps/baselayout: 2.0.1
sys-apps/openrc:     0.6.1-r1
sys-apps/sandbox:    2.2
sys-devel/autoconf:  2.13, 2.65
sys-devel/automake:  1.8.5-r3, 1.9.6-r3, 1.10.3, 1.11.1
sys-devel/binutils:  2.20.1
sys-devel/gcc:       4.3.4, 4.4.3-r2
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6b
virtual/os-headers:  2.6.33
ACCEPT_KEYWORDS="x86 ~x86"
ACCEPT_LICENSE="*"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=pentium4 -O3 -pipe -mfpmath=sse -mmmx -msse2"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/X11/xkb"
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"
CXXFLAGS="-march=pentium4 -O3 -pipe -mfpmath=sse -mmmx -msse2"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests distlocks fixpackages news parallel-fetch protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="C"
LDFLAGS="-Wl,-O1"
MAKEOPTS="-j3"
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/desktop-effects /usr/local/portage/layman/vmware /usr/local/portage/layman/pro-audio /usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X aac acl acpi alsa apm artworkextra asf avahi beagle berkdb bzip2 cairo cdr cli cracklib crypt cscope cups cxx dbus divx dri dv dvd dvdr eds emerald encode esd evo exif fam flac fortran gdbm glitz gnome gpm gtk gtk2 hal iconv icq imap ipod ipv6 jabber jack jpeg ldap mad mmx mmxext modules mono mozbranding mp3 mpeg msn mudflap ncurses nls nptl nptlonly ogg opengl openmp pam pcre pdf perl png pppd python qt3support quicktime readline reflection samba sdl session spl sse sse2 ssl svg sysfs tcpd theora threads tiff truetype unicode v4l v4l2 vorbis win32codecs x264 x86 xcomposite xine xinerama xorg xosd xulrunner xv xvid zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 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="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="nvidia" 
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Samuli Suominen (RETIRED) gentoo-dev 2010-04-28 08:13:19 UTC
duplicate of bug 270120 ?
Comment 2 Mark R. Pariente 2010-04-28 08:15:13 UTC
Indeed, didn't use the right search keywords I guess. Thanks for pointing it out.

*** This bug has been marked as a duplicate of bug 270120 ***