ID: 28639
Comment by: scottmacvicar at ntlworld dot com
Reported By: jim at bluedojo dot com
Status: Verified
Bug Type: GD related
Operating System: Windows XP
PHP Version: 4.3.7
New Comment:
Problem is in GetDataBlock_ it doesn't even return -1 so constantly
loops within the end code handling part of LWZReadByte_
while ((count = GetDataBlock(fd, buf)) > 0)
is the loop in question in libgd/gd_gif_in.c
I dont have enough time to see whats wrong with that function but its
there its looping.
Previous Comments:
------------------------------------------------------------------------
[2004-06-15 12:45:03] iridium at beyondunreal dot com
I have reproduced this bug using
php -r
"imagecreatefromgif('http://members.tripod.com/~TyroneZero/drstrangelove.gif');"
on both windows xp in PHP 5.0.0rc2
and linux with 4.3.6
(both command line).
The above command causes it to hang. Tracing through the code using a
debugger it does look a lot like an infinate loop, though it could just
be a really long one.
I believe the infinate loop starts at line 155 in gd_gif_in.c at
for (;;) {
- I think it may just not be reaching an exit condition.
I may investigate more later.
Very strangely, if I download the gif and run the same command without
going to the site at runtime, there is no such problem.
Irid.
------------------------------------------------------------------------
[2004-06-14 14:02:11] [EMAIL PROTECTED]
It seems this is Windows specific issue caused most probably by
php_gd2.dll.
------------------------------------------------------------------------
[2004-06-06 20:04:26] jim at bluedojo dot com
Yes, the images are corrupt. I believe that is why the function
imageCreateFromGif() is going into an infinite loop. I need to have
the function just exit and not loop infinitely.
When I run the php page from the command line it goes into an infinite
loop. When I load the php page from an Apache web server, it causes
Apache to stall infinitely. My processor maxes out and I have to go to
the Windows Task Menu to cancel the process.
I am running the following:
Windows XP
Apache/1.3.28
PHP/4.3.7
GD library is turned on in php.ini
Any help would be greatful. Thanks.
------------------------------------------------------------------------
[2004-06-06 18:32:07] [EMAIL PROTECTED]
The 2 gif images you've offered are corrupt, and I cannot
replicate the cpu usage you are reporting.
------------------------------------------------------------------------
[2004-06-05 20:00:26] jim at bluedojo dot com
This picture also causes processor to max out:
http://www.geocities.com/Tokyo/Palace/5677/riiya1.gif
------------------------------------------------------------------------
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/28639
--
Edit this bug report at http://bugs.php.net/?id=28639&edit=1