#40189 [Asn->Csd]: endless loop in zlib.inflate stream filter
ID: 40189
Updated by: tony2001@php.net
Reported By: cellog@php.net
-Status: Assigned
+Status: Closed
Bug Type: Zlib Related
Operating System: kubuntu linux
PHP Version: 5CVS-2007-01-22 (CVS)
Assigned To: pollita
New Comment:
Patch committed (+ I ported the same patch to ext/bz2).
Previous Comments:
------------------------------------------------------------------------
[2007-01-23 23:58:53] cellog@php.net
last detail: I have a 64-bit machine, not sure if that
matters or not, but there you go
------------------------------------------------------------------------
[2007-01-23 23:57:55] cellog@php.net
not sure what this cvs update -f business was. Forget
that. Use this to reproduce the bug:
cd pecl/phar
cvs update -D "Jan 22 01:00:00 2007 UTC"
ln -s ~/php5/ext/phar ~/pecl/phar
cd ~/php5
./configure --enable-debug --enable-phar --with-zlib
make cli
cd ext/phar/tests
~/php5/sapi/cli/php phar_ctx_001.phpt
~/php5/sapi/cli/php phar_ctx_001.phpt
or
~/php5/sapi/cli/php phar_oo_compressed_001.phpt
~/php5/sapi/cli/php phar_oo_compressed_001.phpt
(sometimes it only happened on the 2nd run for me)
------------------------------------------------------------------------
[2007-01-22 14:44:59] cellog@php.net
cvs update -f "Jan 22 02:07:44 2007 UTC"
I committed a workaround for the failure, completely
forgetting you needed the file for this bug, sorry. This
is the patch that needs to be reversed:
http://cvs.php.net/viewvc.cgi/pecl/phar/phar.c?r1=1.135&r2=1.136
------------------------------------------------------------------------
[2007-01-22 09:46:45] tony2001@php.net
I have to say, I can't reproduce it on my Suse either.
4 tests fail, but the ones you mentioned work fine.
Btw, phar_oo_compressed_001.phpt fails because of several leaks:
016+ /local/dev/php/5_2/main/streams/streams.c(386) : Stream of type
'MEMORY' 0x40203094 (path:(null)) was not closed
017+ /local/dev/php/5_2/main/streams/streams.c(386) : Stream of type
'TEMP' 0x402004f8 (path:(null)) was not closed
You need to close those streams when destroying the object.
------------------------------------------------------------------------
[2007-01-22 08:55:57] mike@php.net
Seems to work fine here... (incidentally same OS and PHP version):
mike@honeybadger:~/cvs/pecl/phar/tests$ php -d"phar.require_hash=0"
-d"phar.readonly=0" phar_oo_compressed_001.phpt
--TEST--
Phar context
--SKIPIF--
--INI--
phar.require_hash=0
phar.readonly=0
--FILE--
string(1) "a"
bool(false)
string(1) "b"
bool(false)
string(1) "c"
bool(false)
string(5) "new a"
bool(false)
string(5) "new b"
bool(true)
string(1) "c"
bool(false)
string(5) "new d"
bool(false)
===DONE===
--CLEAN--
--EXPECTF--
string(1) "a"
bool(false)
string(1) "b"
bool(false)
string(1) "c"
bool(false)
string(5) "new a"
bool(false)
string(5) "new b"
bool(true)
string(1) "c"
bool(false)
string(5) "new d"
bool(false)
===DONE===
mike@honeybadger:~/cvs/pecl/phar/tests$ php -d"phar.require_hash=0"
-d"phar.readonly=0" phar_ctx_001.phpt
--TEST--
Phar context
--SKIPIF--
--INI--
phar.require_hash=0
phar.readonly=0
--FILE--
string(1) "a"
bool(false)
string(1) "b"
bool(false)
string(1) "c"
bool(false)
string(5) "new a"
bool(false)
string(5) "new b"
bool(true)
string(1) "c"
bool(false)
string(5) "new d"
bool(false)
===DONE===
--CLEAN--
--EXPECTF--
string(1) "a"
bool(false)
string(1) "b"
bool(false)
string(1) "c"
bool(false)
string(5) "new a"
bool(false)
string(5) "new b"
bool(true)
string(1) "c"
bool(false)
string(5) "new d"
bool(false)
===DONE===
Tests that fail here:
FAILED TEST SUMMARY
---------------------------------------------------------------------
Phar::mapPhar valid file (bzip2)
[/home/mike/cvs/pecl/phar/tests/015b.phpt]
Phar::mapPhar invalid file (gzipped file length is too short)
[/home/mike/cvs/pecl/phar/tests/016.phpt]
Phar::mapPhar invalid file (gzipped file length is too short)
[/home/mike/cvs/pecl/phar/tests/016b.phpt]
Phar: test that refcounting avoids problems with deleting a file
[/home/mike/cvs/pecl/phar/tests/refcount1.phpt]
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/40189
--
Edit this bug report at http://bugs.php.net/?id=40189&edit=1
Thread (10 messages)