ID: 28639
Comment by: iridium at beyondunreal 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:
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.
Previous Comments:
------------------------------------------------------------------------
[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
------------------------------------------------------------------------
[2004-06-05 05:55:24] jim at bluedojo dot com
Description:
------------
For some reason, this gif causes the processor to max out at 100% when
imageCreateFromGif() function is used.
Reproduce code:
---------------
<?
imageCreateFromGif("http://members.tripod.com/~TyroneZero/drstrangelove.gif");
?>
Expected result:
----------------
Creates a GD image
Actual result:
--------------
Infinite Loop. Maxes out processor. Causes operating system to stall.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=28639&edit=1