Bug #70064 [NEW]: imagescale(..., IMG_BICUBIC) leaks memory
| From: | cmb@php.net | Date: | Mon, 13 Jul 2015 13:14:09 +0000 |
| Subject: | Bug #70064 [NEW]: imagescale(..., IMG_BICUBIC) leaks memory | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-194402@lists.php.net to get a copy of this message | ||
From: cmb
Operating system: *
PHP version: 7.0Git-2015-07-13 (Git)
Package: GD related
Bug Type: Bug
Bug description:imagescale(..., IMG_BICUBIC) leaks memory
Description:
------------
Apparently, imagescale(..., IMG_BICUBIC) leaks memory.
Test script:
---------------
<?php
$im = imagecreatetruecolor(256, 256);
imagescale($im, 32, 32, IMG_BICUBIC);
imagedestroy($im);
?>
Expected result:
----------------
Actual result:
--------------
[Mon Jul 13 15:11:26 2015] Script: '/home/cmb/test.php'
/home/cmb/php-src/ext/gd/libgd/gd.c(202) : Freeing 0x7FC6B1657680 (32
bytes), s
cript=/home/cmb/test.php
/home/cmb/php-src/Zend/zend_alloc.c(2266) : Actual location (location
was relaye
d)
Last leak repeated 255 times
[Mon Jul 13 15:11:26 2015] Script: '/home/cmb/test.php'
/home/cmb/php-src/ext/gd/libgd/gd.c(193) : Freeing 0x7FC6B165AE00 (2048
bytes),
script=/home/cmb/test.php
[Mon Jul 13 15:11:26 2015] Script: '/home/cmb/test.php'
/home/cmb/php-src/ext/gd/libgd/gd.c(194) : Freeing 0x7FC6B165B800 (2048
bytes),
script=/home/cmb/test.php
[Mon Jul 13 15:11:26 2015] Script: '/home/cmb/test.php'
/home/cmb/php-src/ext/gd/libgd/gd.c(201) : Freeing 0x7FC6B1680000 (128
bytes),
script=/home/cmb/test.php
/home/cmb/php-src/Zend/zend_alloc.c(2266) : Actual location (location
was relaye
d)
Last leak repeated 255 times
=== Total 514 memory leaks detected ===
--
Edit bug report at https://bugs.php.net/bug.php?id=70064&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=70064&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=70064&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=70064&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=70064&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=70064&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=70064&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=70064&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=70064&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=70064&r=support
Expected behavior: https://bugs.php.net/fix.php?id=70064&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=70064&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=70064&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=70064&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=70064&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=70064&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=70064&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=70064&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=70064&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=70064&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=70064&r=mysqlcfg