#32775 [Fbk->Opn]: PHP crashes with a segmentation fault on GD2 function
| From: | dirk dot msc at gmx dot de | Date: | Wed, 20 Apr 2005 14:46:24 +0000 |
| Subject: | #32775 [Fbk->Opn]: PHP crashes with a segmentation fault on GD2 function | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-77950@lists.php.net to get a copy of this message | ||
ID: 32775
User updated by: dirk dot msc at gmx dot de
Reported By: dirk dot msc at gmx dot de
-Status: Feedback
+Status: Open
Bug Type: Reproducible crash
Operating System: Linux
PHP Version: 5.0.4
New Comment:
Note: This does not happen with the Windows version of PHP5.
Backtracking the core dump with gdb indicates a crash in the
gdImageFill () function.
Previous Comments:
------------------------------------------------------------------------
[2005-04-20 11:49:57] derick@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php
Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.
------------------------------------------------------------------------
[2005-04-20 11:46:25] dirk dot msc at gmx dot de
Description:
------------
The following script produces a segmentation fault on Linux whereas it
works perfectly on Windows.
You can find the image here:
http://www.hdx4.com/neu/images/buttons/templates/border_top.gif
Please download it as the URL may change.
Reproduce code:
---------------
$img = @imagecreatetruecolor (100, 21) or die ("Cannot Initialize new
GD image stream");
$col_white=imagecolorallocate($img, 0xFF, 0xFF, 0xFF);
imagefill($img, 0,0, $col_white);
$top=@imagecreatefromgif("border_top.gif");
// $top=@imagecreatefrompng("default.png"); // if I use this one it
works
if ($top) {
imagesettile($img, $top);
imagefill($img, 0,0, IMG_COLOR_TILED);
}
header ("Content-type: image/png");
imagepng($img);
imagedestroy($img);
imagedestroy($top);
Expected result:
----------------
Anything, but not a crash.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=32775&edit=1