Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 171867 - PHP emerged with -funroll-loops seems to segfault often
Summary: PHP emerged with -funroll-loops seems to segfault often
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-03-23 00:02 UTC by scotty49
Modified: 2007-03-23 11:51 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 scotty49 2007-03-23 00:02:53 UTC
After I emerged PHP 5.2.1-r3 with the following CFLAGS

-O3 -mcpu=i686 -mtune=i686 -pipe -fforce-addr -fomit-frame-pointer -fun                                                                                                               roll-loops -frerun-cse-after-loop -falign-functions=4

it used to segfault whenever I called special functions (fopen, mktime, sin, round, ...). I tried multiple CFLAG constellations resulting in the same behavior until I removed -funroll-loops. Another Gentoo user has reported a similar problem here: 

http://forums.gentoo.org/viewtopic.php?p=3973041#3973041

Suggestion: A warning could be displayed, if this CFLAG is detected.

Reproducible: Always

Steps to Reproduce:
1. emerge "=dev-lang/php-5.2.1-r3"
2. run any PHP script with a little more complex function call (e. g. "<?php echo round(2.5); ?>")

Actual Results:  
Segmentation Fault / If used as apache module, the apache child exits with code 11

Expected Results:  
Normal function exection, therefore output "3" in above example.

emerge --info (without -funroll-loops CFLAG)

Portage 2.1.2.2 (default-linux/x86/2006.0, gcc-3.4.6, glibc-2.5-r0, 2.6.18-gentoo-r2 i686)
=================================================================
System uname: 2.6.18-gentoo-r2 i686 AMD Duron(tm) processor
Gentoo Base System release 1.12.9
Timestamp of tree: Thu, 22 Mar 2007 03:00:08 +0000
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [enabled]
dev-java/java-config: 1.3.7, 2.0.31
dev-lang/python:     2.2.3-r5, 2.3.5-r3, 2.4.3-r4
dev-python/pycrypto: 2.0.1-r5
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.61
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.16.1-r3
sys-devel/gcc-config: 1.3.14
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.17-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O3 -mcpu=i686 -mtune=i686 -pipe -fforce-addr -fomit-frame-pointer -frerun-cse-after-loop -falign-functions=4 -frerun-loop-opt"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.1/share/config /usr/kde/3.2/share/config /usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/lib/fax /usr/lib/mozilla/defaults/pref /usr/share/X11/xkb /usr/share/config /var/spool/fax/etc"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/java-config/vms/ /etc/php/apache1-php5/ext-active/ /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"
CXXFLAGS="-O3 -mcpu=i686 -mtune=i686 -pipe -fforce-addr -fomit-frame-pointer -frerun-cse-after-loop -falign-functions=4 -frerun-loop-opt"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distcc distlocks metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS="http://ds.thn.htu.se/linux/gentoo http://mirror.switch.ch/ftp/mirror/gentoo/ http://gentoo.ynet.sk/pub http://ftp.belnet.be/mirror/rsync.gentoo.org/gentoo/ http://trumpetti.atm.tut.fi/gentoo/"
LANG="de_DE@euro"
LINGUAS="de"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3dfx 3dnow X Xaw3d acpi alsa apache2 apm arts avi bitmap-fonts cdr cli cracklib crypt ctype cups dga dri dvb dvd eds emboss encode esd fax flash foomaticdb fortran gd gdbm gif gnome gphoto2 gpm gstreamer gtk gtk2 iconv imap imlib innodb ipv6 isdnlog java jikes jpeg kde kerberos lcms libg++ libwww lirc mad maildir mbox mcal midi mikmod mmx motif mozilla mp3 mpeg mule mysql mysqli nas ncurses nls nocd nptl nptlonly ogg oggvorbis opengl oss pam pam-mysql pcre pdflib perl php plotutils png ppds pppd prelink python qt qt3 qt4 quicktime readline reflection samba sasl scanner sdl session slp socks5 spell spl sse ssl svga tcltk tcpd tiff truetype truetype-fonts type1-fonts unicode usb vhosts videos vorbis wmf x86 xinerama xml xml2 xorg xosd xv 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 mulaw multi null plug rate route share shm softvol" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="de" USERLAND="GNU" VIDEO_CARDS="apm ark ati chips cirrus cyrix dummy fbdev glint i128 i740 i810 imstt mga neomagic nsc nv rendition s3 s3virge savage siliconmotion sis sisusb tdfx tga trident tseng v4l vesa vga via vmware voodoo"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2007-03-23 11:51:44 UTC
> Doctor, it hurts when I do this...
>> So don't!

Sorry, take this upstream if you wish; we don't support ricer flags.