php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #41612 'make test' goes into infinite loop on infinite loop test
Submitted: 2007-06-06 15:09 UTC Modified: 2010-12-20 12:26 UTC
From: long at ku dot edu Assigned:
Status: Not a bug Package: GD related
PHP Version: 5.2.3 OS: RHEL3
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: long at ku dot edu
New email:
PHP Version: OS:

 

 [2007-06-06 15:09 UTC] long at ku dot edu
Description:
------------
Here is the configure line I used:
#! /bin/sh
#
# Created by configure

CFLAGS='-O3' \
CXXFLAGS='-O3' \
LIBS='-lssl -lncurses' \
'./configure' \
'--enable-discard-path' \
'--with-openssl=shared' \
'--with-zlib=shared' \
'--enable-bcmath' \
'--with-bz2=shared' \
'--enable-calendar' \
'--with-curl=shared' \
'--enable-dba=shared' \
'--with-gdbm=shared' \
'--with-db4=shared' \
'--with-cdb=shared' \
'--with-inifile=shared' \
'--enable-dbase' \
'--enable-dbx' \
'--enable-dio' \
'--enable-exif' \
'--enable-filepro' \
'--enable-ftp' \
'--with-gd=shared' \
'--enable-gd-native-ttf' \
'--enable-gd-jis-conv' \
'--with-gettext=shared' \
'--with-gmp=shared' \
'--with-imap=shared' \
'--with-kerberos' \
'--with-imap-ssl' \
'--with-ldap' \
'--enable-mbstring' \
'--with-mysql=/usr' \
'--with-ncurses=shared' \
'--with-oci8' \
'--with-pgsql=shared' \
'--with-pspell=shared' \
'--with-readline=shared' \
'--enable-shmop' \
'--with-snmp=shared' \
'--enable-sockets' \
'--with-sqlite' \
'--enable-sysvmsg' \
'--enable-sysvsem' \
'--enable-sysvshm' \
'--enable-wddx' \
'--with-freetype-dir' \
'--with-jpeg-dir' \
'--with-xpm-dir' \
'--with-apxs2=/usr/local/apache/bin/apxs' \
'--with-mysqli' \
'--with-pdo-mysql' \
'--with-pdo-oci' \
'--with-tidy' \
'--enable-soap=shared' \
'--enable-zip' \
"$@"

When I run 'make test' it gets to this point and enters an infinite loop it appears:

PASS jpeg <--> gd1/gd2 conversion test [ext/gd/tests/jpg2gd.phpt]
TEST 1061/2667 [ext/gd/tests/libgd00086.phpt]
Fatal error: Out of memory (allocated 1611661312) (tried to allocate 1610350689 bytes) in /apps/home/long/src/php-5.2.3-ap2/run-tests.php on line 882

I've also verified this in php5.2-200706061230.

Here's a gdb backtrace:

Loaded symbols for /lib/libnss_files.so.2
0x009b616e in __read_nocancel () from /lib/tls/libc.so.6
(gdb) bt
#0  0x009b616e in __read_nocancel () from /lib/tls/libc.so.6
#1  0x00952bb8 in _IO_file_read_internal () from /lib/tls/libc.so.6
#2  0x00951e8e in _IO_new_file_underflow () from /lib/tls/libc.so.6
#3  0x00953f9d in __underflow () from /lib/tls/libc.so.6
#4  0x00953068 in _IO_file_xsgetn_internal () from /lib/tls/libc.so.6
#5  0x009546d8 in _IO_sgetn_internal () from /lib/tls/libc.so.6
#6  0x009476bd in fread () from /lib/tls/libc.so.6
#7  0x003d8af9 in fileGetbuf () from /usr/local/lib/php/extensions/no-debug-non-zts-20060613/gd.so
#8  0x003d862b in php_gd_gdGetBuf () from /usr/local/lib/php/extensions/no-debug-non-zts-20060613/gd.so
#9  0x0055f9e4 in png_read_data () from /usr/lib/libpng12.so.0
#10 0x099ff0e8 in ?? ()
#11 0x00000009 in ?? ()
#12 0xb75b43cc in ?? ()
#13 0x099fecc8 in ?? ()
#14 0xbfff5db4 in ?? ()
#15 0x0056ea0c in ?? () from /usr/lib/libpng12.so.0
#16 0xbfff5dc8 in ?? ()
#17 0x00555103 in png_crc_read () from /usr/lib/libpng12.so.0
#18 0x099fee30 in ?? ()
#19 0x099ff0e8 in ?? ()
#20 0x00000009 in ?? ()
#21 0x0056ea0c in ?? () from /usr/lib/libpng12.so.0
#22 0x00000009 in ?? ()
#23 0x00002000 in ?? ()
#24 0xbfff5de8 in ?? ()
#25 0x00555220 in png_crc_finish () from /usr/lib/libpng12.so.0
#26 0x099fee30 in ?? ()
#27 0x099ff0e8 in ?? ()
#28 0x00000009 in ?? ()
---Type <return> to continue, or q <return> to quit---
#29 0x0056ea0c in ?? () from /usr/lib/libpng12.so.0
#30 0x099fefa9 in ?? ()
#31 0x0056b0bf in png_pHYs () from /usr/lib/libpng12.so.0
#32 0xbfff5e58 in ?? ()
#33 0x00557f20 in png_handle_unknown () from /usr/lib/libpng12.so.0
#34 0x099fee30 in ?? ()
#35 0x00000009 in ?? ()
#36 0xbfff5e18 in ?? ()
#37 0x003d862b in php_gd_gdGetBuf () from /usr/local/lib/php/extensions/no-debug-non-zts-20060613/gd.so
Previous frame inner to this frame (corrupt stack?)
(gdb)                                     

Expected result:
----------------
I expect the test to either PASS or FAIL and 'make test' to continue.

Actual result:
--------------
TEST 1061/2667 [ext/gd/tests/libgd00086.phpt]
Fatal error: Out of memory (allocated 1611661312) (tried to allocate 1610350689 bytes) in /apps/home/long/src/php-5.2.3-ap2/run-tests.php on line 882

(infinite loop?)


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-06-06 15:23 UTC] tony2001@php.net
What's your version of libpng?
 [2007-06-06 15:25 UTC] long at ku dot edu
[long@wbtstap php5.2-200706061230]$ rpm -qa|grep libpng
libpng-1.2.2-27
libpng-devel-1.2.2-27
 [2007-06-06 15:35 UTC] tony2001@php.net
What if you update it to the latest available version?
1.2.2 is 5 years old.
 [2007-06-06 15:47 UTC] long at ku dot edu
Stuck on RHEL3 and I try and stick with vendor packages as much as possible.  But, the good news is I think I found something.  If I compile it --with-gd and not --with-gd=shared (oh, and -O2 instead of -O3 although that by itself did not fix it) then that test passes.  Always worked with shared in earlier versions though.  No biggie though.
 [2007-06-06 16:03 UTC] tony2001@php.net
Just install new libpng in /tmp and rebuild PHP with --with-png-dir=/tmp, that should be enough to test it.
 [2007-06-06 18:27 UTC] sniper@php.net
And you need to do 'make install' before running 'make test' when you have shared extensions with PHP <= 5.2.3, otherwise the old extensions are used when running tests. (I fixed this in CVS)
 [2007-06-06 19:07 UTC] long at ku dot edu
Bingo, that was it.  If I do the 'make install' before the 'make test' then it works (even with my out of date libpng).
 [2007-06-06 19:40 UTC] tony2001@php.net
Great, thanks.
 [2010-12-20 12:26 UTC] jani@php.net
-Package: Tidy +Package: GD related
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sun May 11 10:01:27 2025 UTC