Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 189611 - dev-lang/php-5.2.4_pre200708051230-r2 memory leak in SAPI.c
Summary: dev-lang/php-5.2.4_pre200708051230-r2 memory leak in SAPI.c
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: PHP Bugs
URL: http://bugs.php.net/bug.php?id=42338
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-08-20 16:11 UTC by Marek Cruz
Modified: 2007-08-21 13:41 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 Marek Cruz 2007-08-20 16:11:44 UTC
PHP 5.2.4_pre200708051230-r2 memory leaks
-----------------------------------------
[Sat Aug 18 17:18:33 2007] [error] [client 127.0.0.1] PHP Warning:  file_get_contents(http://127.0.0.1/weblog/test.php?test[][][][][][][][][][$
/var/www/localhost/htdocs/weblog/test.php(6) : Warning - file_get_contents(http://127.0.0.1/weblog/test.php?test[][][][][][][][][][][][][][][]$
/var/www/localhost/htdocs/weblog/test.php(6) : Warning - file_get_contents(http://127.0.0.1/weblog/test.php?test[][][][][][][][][][][][][][][]$
=== Total 2 memory leaks detected ===
Last leak repeated 1 time
/var/tmp/portage/dev-lang/php-5.2.4_pre200708051230-r2/work/php5.2-200708051230/main/SAPI.c(940) :  Freeing 0x082A9D98 (10 bytes), script=/var$
[Sat Aug 18 17:18:03 2007]  Script:  '/var/www/localhost/htdocs/weblog/test.php'
failed to open stream: HTTP request failed!
[Sat Aug 18 17:18:33 2007] [error] [client 127.0.0.1] PHP Warning:  file_get_contents(http://127.0.0.1/weblog/test.php?test[][][][][][][][][][$
/var/www/localhost/htdocs/weblog/test.php(6) : Warning - file_get_contents(http://127.0.0.1/weblog/test.php?test[][][][][][][][][][][][[Sat Au$
=== Total 2 memory leaks detected ===

Reproducible: Always

Steps to Reproduce:
<?php
// save as test.php into directory weblog in your HTDOCS
if (!isset($_GET['test'])) {
    for ($i = 0; $i < 5; $i++) { // change $i < 5 to $i < 0 after first
running of this script
        $query = str_repeat('[]', 1024);
        $url = 'http://127.0.0.1/weblog/test.php?test' . $query . '=1';
        file_get_contents($url);
    }
}

echo 'finished';
?>

Actual Results:  
http://pastebin.ca/662282

Expected Results:  
No memory leak =)

USE="apache2 berkdb bzip2 cli crypt ctype debug gd gdbm iconv mysql
ncurses nls pcre pdo readline reflection session simplexml soap sockets
spell spl ssl suhosin tokenizer truetype unicode xml xmlreader xmlwriter
xsl zlib"

----------------------------------------------------------------------------
Portage 2.1.2.11 (default-linux/x86/2006.1/desktop, gcc-4.1.2, glibc-2.5-r4, 2.6.21.5 i686)
=================================================================
System uname: 2.6.21.5 i686 AMD Sempron(tm) 2600+
Gentoo Base System release 1.12.9
Timestamp of tree: Mon, 20 Aug 2007 06:30:11 +0000
dev-java/java-config: 1.3.7, 2.0.31-r5
dev-lang/python:     2.4.4-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.17
sys-devel/gcc-config: 1.3.16
sys-devel/libtool:   1.5.23b
virtual/os-headers:  2.6.17-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=athlon-xp -O3 -pipe -fomit-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/lib/mozilla/defaults/pref /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/java-config/vms/ /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/splash /etc/terminfo"
CXXFLAGS="-march=athlon-xp -O3 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
MAKEOPTS=""
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_EXTRA_OPTS=""
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"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext X acpi alsa arts avi berkdb bitmap-fonts cairo cdr cli cracklib crypt cups dbus debug dlloader dri dvd dvdr eds emboss encode esd fam firefox fortran gdbm gif gnome gpm gstreamer gtk hal iconv isdnlog jpeg ldap libg++ mad midi mikmod mmx mmxext mp3 mpeg mudflap ncurses nls nptl nptlonly nsplugin ogg opengl openmp oss pam pcre pdflib perl png postgres ppds pppd python qt3 qt4 quicktime readline reflection sdl session spell spl sse ssl tcpd tiff tk truetype truetype-fonts type1-fonts udev unicode vorbis win32codecs wma x86 xf86-video-ati xml xorg 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" USERLAND="GNU" VIDEO_CARDS="apm ark chips cirrus cyrix dummy fbdev glint i128 i740 i810 imstt mach64 mga neomagic nsc nv r128 radeon rendition s3 s3virge savage siliconmotion sis sisusb tdfx tga trident tseng v4l vesa vga via vmware voodoo"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2007-08-21 13:41:27 UTC
Please, move this to bugs.php.net, don't see what we could do here. And kindly choose a different attitude than the guy on the bug referred to in URL.