Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 227373 - php 5.2.6 segmentation fault
Summary: php 5.2.6 segmentation fault
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: PHP Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-06-16 06:38 UTC by pavel
Modified: 2008-06-16 13:53 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 pavel 2008-06-16 06:38:47 UTC
php throws segmentation fault at any sample script like:
php -r "time(1);",  strlen("1"); or "print_r(1);" the latter outputs "1" and then segfaults. It happened after upgrading gcc to 4.3.1 and some rebuilds including php.

This problem disappears as soon as USE flag *debug* is enabled.

// ++++++++++++++++++++++++++++++++++++++++++
// emerge --info
//

Portage 2.1.5.5 (default-linux/x86/2007.0, gcc-4.3.1, glibc-2.8_p20080602-r0, 2.6.23-gentoo-r2 i686)
=================================================================
System uname: 2.6.23-gentoo-r2 i686 Intel(R) Core(TM)2 Duo CPU T7300 @ 2.00GHz
Timestamp of tree: Sat, 14 Jun 2008 20:32:01 +0000
app-shells/bash:     3.2_p39
dev-java/java-config: 1.3.7, 2.1.6
dev-lang/python:     2.4.4-r4, 2.5.2-r4
dev-python/pycrypto: 2.0.1-r6
sys-apps/baselayout: 1.12.12
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.62
sys-devel/automake:  1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1-r1
sys-devel/binutils:  2.18-r1
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   2.2.4
virtual/os-headers:  2.6.25-r4
ACCEPT_KEYWORDS="x86 ~x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=core2 -finline-functions -pipe -funroll-loops -momit-leaf-frame-pointer"
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"
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 -march=core2 -finline-functions -pipe -funroll-loops -momit-leaf-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks parallel-fetch sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LANG=""
LC_ALL=""
LDFLAGS=""
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/portage/local/layman/vmware /usr/portage/local/layman/gentoo-china /usr/portage/local/layman/sunrise /usr/portage/local/layman/webapps-experimental /usr/portage/local/layman/thousand-parsec /usr/portage/local/layman/games /usr/local/portage /usr/portage/local"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="7zip X Xaw3d a52 aac acl acpi alsa apache2 avi berkdb bluetooth bonobo bzip2 cairo cdr cli cracklib crypt cscope cups curl dga directfb divx4linux doc dri dts dvb dvd dvdnav dvdr dvdread effects emacs encode examples exif fbcon ffmpeg firefox flac flash fortran gd gdbm gif gimp gimpprint glitz gpm gstreamer gtk gtk2 gtkhtml gzip-el iconv ieee1394 imlib inkjar ipv6 isdnlog jack jack-tmpfs java jpeg kde kerberos ldap ldapsam leim libg++ libgda libsamplerate libwww live lm_sensors logitech-mouse mad maildir matroska mbox midi mjpeg mmx mozcalendar mozdevelop mozilla mp2 mp3 mpeg mplayer mudflap mule mysql ncurses nls nptl nptlonly nsplugin nvidia odbc ogg oggvorbis opengl openmp oss pam pcre pdf pdflib perl plugin png posix postgres pppd python qt qt4 quicktime radio readline real reflection samba sasl scanner sdk sdl session spell spl sqlite srt sse sse2 ssl ssse3 stream subtitles svg svga tcltk tcpd threads tiff truetype unicode usb v4l v4l2 vcd vorbis win32codecs wmf wmp x264 x86 xcomposite xine xinerama xml xml2 xorg xscreensaver xulrunner xv xvid 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 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" DVB_CARDS="usb-dib0700 dibusb-usb2 usb-a800" ELIBC="glibc" INPUT_DEVICES="evdev keyboard mouse synaptics wacom" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="dummy fbdev nv v4l vga vmware"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Christian Hoffmann (RETIRED) gentoo-dev 2008-06-16 13:53:22 UTC
While the bug does not sound unknown to me (ia64 has been having exactly this problem with every 5.2.x version, workaround is package.use.force'ing USE=debug), we do not support CFLAGS like -funroll-loops. Such flags are known to be problematic and I don't feel like playing around with this myself, just to debug this issue.
So I'm sorry, but you are on your own with this issue, unless you are able to reproduce it with sane CFLAGS (and having built every relevant lib with mentioned sane CFLAGS).

Just for reference, I'm not able to reproduce this on my system (-march=core2 as well, recently rebuilt w/ gcc-4.3), so I really assume this is related to your other CFLAGS.