Bug #69024 [Asn->Ver]: imagescale segfault with palette based image
Edit report at https://bugs.php.net/bug.php?id=69024&edit=1
ID: 69024
Updated by: cmb@php.net
Reported by: gmblar+php at gmail dot com
Summary: imagescale segfault with palette based image
-Status: Assigned
+Status: Verified
Type: Bug
Package: GD related
Operating System: MacOSX 10.10.2
PHP Version: 5.6.5
Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
I can confirm the issue with PHP 7.0.0beta1 on Windows, too. I'll
have a closer look.
Previous Comments:
------------------------------------------------------------------------
[2015-07-13 11:04:58] laruence@php.net
I confirm this bug also exists in master, @cmb maybe you could have a look into it?
------------------------------------------------------------------------
[2015-02-11 01:35:09] gmblar+php at gmail dot com
Same with PHP 5.6.5-1~dotdeb.1 on debian 7.6
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff3f41bf1 in ?? () from /usr/lib/php5/20131226/gd.so
(gdb) bt
#0 0x00007ffff3f41bf1 in ?? () from /usr/lib/php5/20131226/gd.so
#1 0x00007ffff3f18f1e in ?? () from /usr/lib/php5/20131226/gd.so
#2 0x00000000006c9919 in dtrace_execute_internal ()
#3 0x000000000077d1e1 in ?? ()
#4 0x0000000000743a88 in execute_ex ()
#5 0x00000000006c97ed in dtrace_execute_ex ()
#6 0x00000000006dc028 in zend_execute_scripts ()
#7 0x000000000067796c in php_execute_script ()
#8 0x0000000000780783 in ?? ()
#9 0x0000000000433b7f in ?? ()
#10 0x00007ffff503eeed in __libc_start_main () from /lib/x86_64-linux-gnu/libc.so.6
#11 0x0000000000433c15 in _start ()
------------------------------------------------------------------------
[2015-02-11 01:33:21] gmblar+php at gmail dot com
Description:
------------
imagescale segfault with palette based image.
Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0x0000000000000000
0x0000000100f7843f in gdImageScaleTwoPass ()
(gdb) bt
#0 0x0000000100f7843f in gdImageScaleTwoPass ()
#1 0x0000000100f5e3ba in zif_imagescale ()
#2 0x0000000100ac4bb0 in xdebug_execute_internal ()
#3 0x000000010023fe24 in zend_do_fcall_common_helper_SPEC ()
#4 0x00000001001fd5f6 in execute_ex ()
#5 0x0000000100ac48b9 in xdebug_execute_ex ()
#6 0x00000001001d64b2 in zend_execute_scripts ()
#7 0x000000010017ec27 in php_execute_script ()
#8 0x000000010025f6be in do_cli ()
#9 0x000000010025e354 in main ()
Test script:
---------------
<?php
$image = imagecreate(256, 256);
imagescale($image, 32, 32, IMG_BICUBIC);
Expected result:
----------------
Nothing
Actual result:
--------------
Segmentation fault: 11
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=69024&edit=1
Thread (6 messages)