#46433 [Fbk-Opn]: imagecreatefrom(...) leaks memory on errors
ID: 46433 User updated by: ak at pre-secure dot de Reported By: ak at pre-secure dot de -Status: Feedback +Status: Open Bug Type: GD related Operating System: Linux (OpenSUSE) PHP Version: 5.2.9 Assigned To: pajoye New Comment: ==18171== Memcheck, a memory error detector. ==18171== Copyright (C) 2002-2007, and GNU GPL'd, by Julian Seward et al. ==18171== Using LibVEX rev 1854, a library for dynamic binary translation. ==18171== Copyright (C) 2004-2007, and GNU GPL'd, by OpenWorks LLP. ==18171== Using valgrind-3.3.1, a dynamic binary instrumentation framework. ==18171== Copyright (C) 2000-2007, and GNU GPL'd, by Julian Seward et al. ==18171== For more details, rerun with: -v ==18171== Memory: 104664PHP Warning: imagecreatefrompng(): gd-png: fatal libpng error: IDAT: CRC error in /srv/www/htdocs/ak/memtest.php on line 5 PHP Warning: imagecreatefrompng(): gd-png error: setjmp returns error condition in /srv/www/htdocs/ak/memtest.php on line 5 PHP Warning: imagecreatefrompng(): 'anyimage.png' is not a valid PNG file in /srv/www/htdocs/ak/memtest.php on line 5 ==18171== ==18171== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 96 from 2) ==18171== malloc/free: in use at exit: 7,917 bytes in 15 blocks. ==18171== malloc/free: 13,027 allocs, 13,012 frees, 4,751,157 bytes allocated. ==18171== For counts of detected errors, rerun with: -v ==18171== searching for pointers to 15 not-freed blocks. ==18171== checked 525,192 bytes. ==18171== ==18171== LEAK SUMMARY: ==18171==definitely lost: 0 bytes in 0 blocks. ==18171== possibly lost: 0 bytes in 0 blocks. ==18171==still reachable: 7,917 bytes in 15 blocks. ==18171== suppressed: 0 bytes in 0 blocks. ==18171== Rerun with --leak-check=full to see details of leaked memory. Previous Comments: [2009-06-11 13:17:46] paj...@php.net Run a single pass through valgrind please. [2009-06-11 13:11:42] ak at pre-secure dot de I was able to reproduce the Problem with the current release. It occurs if you try to open an image with an crc error. Reproduce code: --- while(true) { print \nMemory: .memory_get_usage(); imagecreatefrompng(anyimage.png); } Image: -- http://drahop.de/php/anyimage.png [2008-10-31 13:45:59] paj...@php.net not a bug bogus [2008-10-31 13:43:32] ak at pre-secure dot de Seems to be fixed with the newest snapshot. Cannot reproduce it anymore. [2008-10-31 13:42:42] paj...@php.net Please provide an example image (link to it or drop me a mail). The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/46433 -- Edit this bug report at http://bugs.php.net/?id=46433edit=1
#46433 [Bgs]: imagecreatefrom(...) leaks memory on errors
ID: 46433 User updated by: ak at pre-secure dot de Reported By: ak at pre-secure dot de Status: Bogus Bug Type: GD related Operating System: Linux (OpenSUSE) PHP Version: 5.2.9 Assigned To: pajoye New Comment: Did you at least try to reproduce it? I tested it on various machines with the given script and image. It will crash in no time cause it allocates to much memory. Previous Comments: [2009-06-16 15:14:08] paj...@php.net ==18171== ERROR SUMMARY: 0 errors from 0 contexts No error. Still bogus. [2009-06-16 13:35:21] ak at pre-secure dot de ==18171== Memcheck, a memory error detector. ==18171== Copyright (C) 2002-2007, and GNU GPL'd, by Julian Seward et al. ==18171== Using LibVEX rev 1854, a library for dynamic binary translation. ==18171== Copyright (C) 2004-2007, and GNU GPL'd, by OpenWorks LLP. ==18171== Using valgrind-3.3.1, a dynamic binary instrumentation framework. ==18171== Copyright (C) 2000-2007, and GNU GPL'd, by Julian Seward et al. ==18171== For more details, rerun with: -v ==18171== Memory: 104664PHP Warning: imagecreatefrompng(): gd-png: fatal libpng error: IDAT: CRC error in /srv/www/htdocs/ak/memtest.php on line 5 PHP Warning: imagecreatefrompng(): gd-png error: setjmp returns error condition in /srv/www/htdocs/ak/memtest.php on line 5 PHP Warning: imagecreatefrompng(): 'anyimage.png' is not a valid PNG file in /srv/www/htdocs/ak/memtest.php on line 5 ==18171== ==18171== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 96 from 2) ==18171== malloc/free: in use at exit: 7,917 bytes in 15 blocks. ==18171== malloc/free: 13,027 allocs, 13,012 frees, 4,751,157 bytes allocated. ==18171== For counts of detected errors, rerun with: -v ==18171== searching for pointers to 15 not-freed blocks. ==18171== checked 525,192 bytes. ==18171== ==18171== LEAK SUMMARY: ==18171==definitely lost: 0 bytes in 0 blocks. ==18171== possibly lost: 0 bytes in 0 blocks. ==18171==still reachable: 7,917 bytes in 15 blocks. ==18171== suppressed: 0 bytes in 0 blocks. ==18171== Rerun with --leak-check=full to see details of leaked memory. [2009-06-11 13:17:46] paj...@php.net Run a single pass through valgrind please. [2009-06-11 13:11:42] ak at pre-secure dot de I was able to reproduce the Problem with the current release. It occurs if you try to open an image with an crc error. Reproduce code: --- while(true) { print \nMemory: .memory_get_usage(); imagecreatefrompng(anyimage.png); } Image: -- http://drahop.de/php/anyimage.png [2008-10-31 13:45:59] paj...@php.net not a bug bogus The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/46433 -- Edit this bug report at http://bugs.php.net/?id=46433edit=1
#46433 [Bgs]: imagecreatefrom(...) leaks memory on errors
ID: 46433 User updated by: ak at pre-secure dot de Reported By: ak at pre-secure dot de Status: Bogus Bug Type: GD related Operating System: Linux (OpenSUSE) -PHP Version: 5.2.6 +PHP Version: 5.2.9 Assigned To: pajoye New Comment: I was able to reproduce the Problem with the current release. It occurs if you try to open an image with an crc error. Reproduce code: --- while(true) { print \nMemory: .memory_get_usage(); imagecreatefrompng(anyimage.png); } Image: -- http://drahop.de/php/anyimage.png Previous Comments: [2008-10-31 13:45:59] paj...@php.net not a bug bogus [2008-10-31 13:43:32] ak at pre-secure dot de Seems to be fixed with the newest snapshot. Cannot reproduce it anymore. [2008-10-31 13:42:42] paj...@php.net Please provide an example image (link to it or drop me a mail). [2008-10-31 13:20:03] ak at pre-secure dot de I have to admit that my initial bugreport is a litte bit too unspecific. The memory problem only occures if the image is tainted, f.e. taking a valid png and change a arbitrary line in the source. This will result in an error like this: PHP Warning: imagecreatefrompng(): gd-png: fatal libpng error: IDAT: CRC error in and a rapid growth of the memory usage. [2008-10-30 16:49:46] fel...@php.net Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows: http://windows.php.net/snapshots/ I can't reproduce it using 5.2.7CVS. The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/46433 -- Edit this bug report at http://bugs.php.net/?id=46433edit=1
#46433 [Fbk-Opn]: imagecreatefrom(...) leaks memory on errors
ID: 46433 User updated by: ak at pre-secure dot de Reported By: ak at pre-secure dot de -Status: Feedback +Status: Open Bug Type: GD related Operating System: Linux (OpenSUSE) PHP Version: 5.2.6 New Comment: I have to admit that my initial bugreport is a litte bit too unspecific. The memory problem only occures if the image is tainted, f.e. taking a valid png and change a arbitrary line in the source. This will result in an error like this: PHP Warning: imagecreatefrompng(): gd-png: fatal libpng error: IDAT: CRC error in and a rapid growth of the memory usage. Previous Comments: [2008-10-30 16:49:46] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows: http://windows.php.net/snapshots/ I can't reproduce it using 5.2.7CVS. [2008-10-30 16:49:23] crrodriguez at opensuse dot org memory usage is constant for me, are you sure you are using version 5.2.6 ? [2008-10-30 16:42:03] ak at pre-secure dot de Description: When trying to create an image from a file and an error occures PHP will lose some memory. Reproduce code: --- while(true) { print \nMemory: .memory_get_usage(); imagecreatefrompng(anyimage.png); } -- Edit this bug report at http://bugs.php.net/?id=46433edit=1
#46433 [Fbk-Opn]: imagecreatefrom(...) leaks memory on errors
ID: 46433 User updated by: ak at pre-secure dot de Reported By: ak at pre-secure dot de -Status: Feedback +Status: Open Bug Type: GD related Operating System: Linux (OpenSUSE) PHP Version: 5.2.6 Assigned To: pajoye New Comment: Seems to be fixed with the newest snapshot. Cannot reproduce it anymore. Previous Comments: [2008-10-31 13:42:42] [EMAIL PROTECTED] Please provide an example image (link to it or drop me a mail). [2008-10-31 13:20:03] ak at pre-secure dot de I have to admit that my initial bugreport is a litte bit too unspecific. The memory problem only occures if the image is tainted, f.e. taking a valid png and change a arbitrary line in the source. This will result in an error like this: PHP Warning: imagecreatefrompng(): gd-png: fatal libpng error: IDAT: CRC error in and a rapid growth of the memory usage. [2008-10-30 16:49:46] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows: http://windows.php.net/snapshots/ I can't reproduce it using 5.2.7CVS. [2008-10-30 16:49:23] crrodriguez at opensuse dot org memory usage is constant for me, are you sure you are using version 5.2.6 ? [2008-10-30 16:42:03] ak at pre-secure dot de Description: When trying to create an image from a file and an error occures PHP will lose some memory. Reproduce code: --- while(true) { print \nMemory: .memory_get_usage(); imagecreatefrompng(anyimage.png); } -- Edit this bug report at http://bugs.php.net/?id=46433edit=1
#46433 [NEW]: imagecreatefrom(...) leaks memory on errors
From: ak at pre-secure dot de Operating system: Linux (OpenSUSE) PHP version: 5.2.6 PHP Bug Type: GD related Bug description: imagecreatefrom(...) leaks memory on errors Description: When trying to create an image from a file and an error occures PHP will lose some memory. Reproduce code: --- while(true) { print \nMemory: .memory_get_usage(); imagecreatefrompng(anyimage.png); } -- Edit bug report at http://bugs.php.net/?id=46433edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=46433r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=46433r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=46433r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=46433r=fixedcvs Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=46433r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=46433r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=46433r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=46433r=needscript Try newer version: http://bugs.php.net/fix.php?id=46433r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=46433r=support Expected behavior: http://bugs.php.net/fix.php?id=46433r=notwrong Not enough info: http://bugs.php.net/fix.php?id=46433r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=46433r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=46433r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=46433r=php4 Daylight Savings:http://bugs.php.net/fix.php?id=46433r=dst IIS Stability: http://bugs.php.net/fix.php?id=46433r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=46433r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=46433r=float No Zend Extensions: http://bugs.php.net/fix.php?id=46433r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=46433r=mysqlcfg