Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 338280

Summary: dev-lang/php: Incorrect array key cast (string to integer) when key > PHP_INT_MAX
Product: Gentoo Linux Reporter: thorn <thor_n>
Component: Current packagesAssignee: PHP Bugs <php-bugs>
Severity: normal    
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Package list:
Runtime testing required: ---

Description thorn 2010-09-21 14:34:47 UTC
I files a bug #52899 with php folks only to find out they can't reproduce it.
It might be specific to gentoo.

Reproducible: Always

$ uname -a
Linux gloriosa 2.6.35-tuxonice-r1 #1 SMP Wed Sep 1 08:59:13 CEST 2010 i686 Intel(R) Pentium(R) 4 CPU 2.80GHz GenuineIntel GNU/Linux

$ php -v
PHP 5.2.14-pl0-gentoo (cli) (built: Sep 17 2010 12:47:23) 
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2010 Zend Technologies

$ emerge --info
Portage (default/linux/x86/10.0/desktop, gcc-4.4.3, glibc-2.11.2-r0, 2.6.35-tuxonice-r1 i686)
System uname: Linux-2.6.35-tuxonice-r1-i686-Intel-R-_Pentium-R-_4_CPU_2.80GHz-with-gentoo-1.12.13
Timestamp of tree: Fri, 17 Sep 2010 06:30:22 +0000
app-shells/bash:     4.1_p7
dev-java/java-config: 2.1.11
dev-lang/python:     2.6.5-r3, 3.1.2-r4
dev-util/cmake:      2.8.1-r2
sys-apps/baselayout: 1.12.13
sys-apps/sandbox:    1.6-r2
sys-devel/autoconf:  2.13, 2.65-r1
sys-devel/automake:  1.5-r1, 1.9.6-r3, 1.10.3, 1.11.1
sys-devel/binutils:  2.20.1-r1
sys-devel/gcc:       4.4.3-r2
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6b
sys-devel/make:      3.81-r2
virtual/os-headers:  2.6.30-r1
ACCEPT_LICENSE="* -@EULA dlj-1.1 Nero-EULA-US skype-eula googleearth AdobeFlash-10.1"
CFLAGS="-O2 -march=pentium4 -pipe -fomit-frame-pointer"
CONFIG_PROTECT="/etc /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /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/sandbox.d /etc/splash /etc/terminfo"
CXXFLAGS="-O2 -march=pentium4 -pipe -fomit-frame-pointer"
FEATURES="assume-digests distlocks fixpackages news parallel-fetch protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en sk"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
USE="7zip X a52 aac accessibility acpi alsa amrnb apache2 audacious audiofile authfile berkdb branding bzip2 cairo cddb cdparanoia cdr cdrom cli cracklib crypt css cups cxx dbus directfb divx dts dvd dvdr dvdread emacs emboss encode exif exim fam fat fbcon fbsplash ffmpeg fftw firefox flac gdbm gif gimp glibc-omitfp glut gmedia gnutls gpm gsm gtk gzip gzip-el hal iconv id3tag idn imap imlib java jpeg jpeg2k lame lcd lcms leim lensfun lzma lzw mad maildir mikmod mmx mng modules motif mozdevelop mozsvg mp3 mp4 mpeg mpeg2 mplayer mpm-worker ncurses nls no-htdocs nosendmail nptl nptlonly nsplugin ntfs nvidia ogg opengl openmp pam pango pcre pdf pdo perl png ppds pymacs python qt3support qt4 quicktime rar readline realmedia reflection reiserfs sdl session sip slang srt sse sse2 ssl subtitles svg sysfs syslog tcl tcltk theora threads tiff tk toolkit-scroll-bars transcode truetype unicode usb userlocales utf8 v4l v4l2 vidix vorbis win32codecs wma wmp x264 x86 xcb xml xmp xorg xpm xulrunner xv xvid zlib" ALSA_CARDS="emu10k1" 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="alias authz_default authz_host autoindex dav deflate dir expires filter headers include info log_config mime mime_magic negotiation rewrite setenvif so status userdir" APACHE2_MPMS="worker" CAMERAS="ptp2 canon" ELIBC="glibc" INPUT_DEVICES="keyboard mouse ps2mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en sk" RUBY_TARGETS="ruby18" SANE_BACKENDS="epson2" USERLAND="GNU" VIDEO_CARDS="nvidia" 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" 
Comment 1 thorn 2010-09-21 14:36:58 UTC
Bug details:
Comment 2 Matti Bickel (RETIRED) gentoo-dev 2010-09-21 17:11:40 UTC
I'll try it later today, can you retry with php-5.3.3 in the meantime?
And no, none of our patches should affect that area :)
Comment 3 thorn 2010-09-22 07:37:22 UTC
I tried php-5.3.3-r1 but the results are same as with 5.2.14.
Comment 4 Ole Markus With (RETIRED) gentoo-dev 2010-09-26 15:51:22 UTC
I managed to reproduce this issue on one machine, both 5.3 and 5.2, but not on another (only 5.3). I'll try compiling 5.3 with identical USE flags on both machines to see if I can track down the issue.
Comment 5 thorn 2010-09-30 06:10:30 UTC
New light shed into the problem from php guy: was marked as duplicate of bug
with proposed patch from debian.
Comment 6 Matti Bickel (RETIRED) gentoo-dev 2010-10-08 17:29:05 UTC
Fixed upstream. I'll try to dig up the patch they used. Maybe we can pull it.
If someone beats me to it: please attach it here. I'll include it in the latest patchset and release a new php version.
Comment 7 Matti Bickel (RETIRED) gentoo-dev 2010-10-31 11:28:32 UTC
I tried and got a patch, unfortunately it breaks the build. So I'm leaving this until next upstream release or somebody producing a working patch (could be me, if i find the time), whichever comes sooner.
Sorry about that, but the fix seems non-trivial and I'm not deep enough into php source to fix this.
Comment 8 Matti Bickel (RETIRED) gentoo-dev 2010-12-22 21:08:02 UTC
Seems to be fixed in 5.3.4
Thanks for the report!