php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #40153 Segfault with external gd and imagefill
Submitted: 2007-01-17 12:53 UTC Modified: 2007-01-17 12:59 UTC
From: kore@php.net Assigned: pajoye (profile)
Status: Not a bug Package: GD related
PHP Version: 5.2.0 OS: Linux 2.6.19
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: kore@php.net
New email:
PHP Version: OS:

 

 [2007-01-17 12:53 UTC] kore@php.net
Description:
------------
Segfault occurs when using imagefill() with external GD library.

Extract from `php -i`
Configure Command =>  './configure' ... '--with-gd=/usr' ...
GD Support => enabled
GD Version => 2.0 or higher

Installed GD version: gd-2.0.33 (Gentoo)

Reproduce code:
---------------
<?php
$image = imagecreatetruecolor( 400, 200 );
$bgColor = imagecolorallocatealpha( $image, 255, 255, 255, 127 );
imagefill( $image, 1, 1, $bgColor );
?>

Expected result:
----------------
Image filled with transparent white

Actual result:
--------------
Segfault

(gdb) run bug_9870_2.php
Starting program: /usr/bin/php bug_9870_2.php
[Thread debugging using libthread_db enabled]
[New Thread -1220794704 (LWP 4989)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1220794704 (LWP 4989)]
0xb7d46dd2 in gdImageSetPixel () from /usr/lib/libgd.so.2
(gdb) bt
#0  0xb7d46dd2 in gdImageSetPixel () from /usr/lib/libgd.so.2
#1  0x00000000 in ?? ()


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-01-17 12:59 UTC] pajoye@php.net
It is not a php bug.

See http://bugs.libgd.org/4 
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sat Jul 26 11:00:03 2025 UTC