ID: 37005 Updated by: [EMAIL PROTECTED] Reported By: ceo at l-i-e dot com -Status: Open +Status: Feedback Bug Type: GD related Operating System: FreeBSD o11.hostbaby.com 5.3-REL PHP Version: 5.1.2 Assigned To: pajoye New Comment:
Sorry, but it is confusing. Give this snippet: $image = imagecreatefromjpeg('088b1cc1662339d5008fd3d67ec7cf01.jpg'); imagejpeg($image); Did you try it on freebsd using the PHP sources and not the BSD ports? The backtrace has nothing to do with GD or the image functions. Please confirm that you use the PHP sources and the bundled GD and not the BSD ports. Previous Comments: ------------------------------------------------------------------------ [2006-04-07 18:35:57] ceo at l-i-e dot com Yes, in fact, I *CAN* stumble my way through a backtrace. This GDB was configured as "i386-marcel-freebsd"... Core was generated by `php'. Program terminated with signal 11, Segmentation fault. Reading symbols from /lib/libcrypt.so.2...done. Loaded symbols for /lib/libcrypt.so.2 Reading symbols from /usr/local/lib/libpng.so.5...done. Loaded symbols for /usr/local/lib/libpng.so.5 Reading symbols from /lib/libz.so.2...done. Loaded symbols for /lib/libz.so.2 Reading symbols from /usr/local/lib/libjpeg.so.9...done. Loaded symbols for /usr/local/lib/libjpeg.so.9 Reading symbols from /lib/libm.so.3...done. Loaded symbols for /lib/libm.so.3 Reading symbols from /usr/local/lib/libxml2.so.5...done. Loaded symbols for /usr/local/lib/libxml2.so.5 Reading symbols from /usr/local/lib/libiconv.so.3...done. Loaded symbols for /usr/local/lib/libiconv.so.3 Reading symbols from /lib/libc.so.5...done. Loaded symbols for /lib/libc.so.5 Reading symbols from /libexec/ld-elf.so.1...done. Loaded symbols for /libexec/ld-elf.so.1 #0 0x00000000 in ?? () (gdb) bt #0 0x00000000 in ?? () #1 0x08164cd1 in execute (op_array=0x832700c) at zend_vm_execute.h:92 #2 0x0814d652 in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /www/acousticdemo.com/php_cvs/php5.1-200604071630/Zend/zend.c:1109 #3 0x081199c4 in php_execute_script (primary_file=0xbfbfeb80) at /www/acousticdemo.com/php_cvs/php5.1-200604071630/main/main.c:1728 #4 0x081c621b in main (argc=2, argv=0xbfbfec10) at /www/acousticdemo.com/php_cvs/php5.1-200604071630/sapi/cgi/cgi_main.c:1603 ------------------------------------------------------------------------ [2006-04-07 18:27:14] ceo at l-i-e dot com I was using this file as my test input: 088b1cc1662339d5008fd3d67ec7cf01.jpg Note that it DOES output the image okay now, or, at least, it "looks" okay in a browser, but a core dump happens when you try to exit PHP with EOF (^D). Sample code: <?php $image = imagecreatefromjpeg('088b1cc1662339d5008fd3d67ec7cf01.jpg');?> <?php imagejpeg($image, 'cvs2.jpg');?> Using 5.1.2 (not snapshot) on Windows, I got messages similar to what you see. C: php -v PHP 5.1.2 (cli) (built: Jan 11 2006 16:40:00) This MAY be specific to FreeBSD, then... ------------------------------------------------------------------------ [2006-04-07 18:22:52] ceo at l-i-e dot com Progress. Using the snapshot and its bundled GD. I can now create the JPEG from the corrupted file, which is way more than I expected, honestly. I can also do imagejpeg($image, 'cvs1.jpg') and get it out. But, then, as soon as I ^D to get out of the interpreter, it core-dumped on me... This was repeatable, twice in a row. You can find the images, the cvs-generated images, and the core dumps here: http://www.acousticdemo.com/info.com/overture/jpeg_crashed/ I dunno if core dumps can be used across machines, but I could maybe stumble my way through a backtrace thingie, if it would help... ------------------------------------------------------------------------ [2006-04-07 12:41:10] [EMAIL PROTECTED] If the segfault still occurs using the CVS snapshot, please provide a script with one or many images to reproduce the segfauls. CURL or any other things are not GD related and will not be considered in this bug. However I tried your images and it is correctly proceeded: Processing: 7512e7d01fc3894e106ca66db2d36064.jpg Warning: imagecreatefromstring(): Data is not in a recognized format in /home/pierre/projects/php/37005/37005.php on line .. ------------------------------------------------------------------------ [2006-04-07 08:34:57] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5.1-latest.tar.gz For Windows: http://snaps.php.net/win32/php5.1-win32-latest.zip ------------------------------------------------------------------------ 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/37005 -- Edit this bug report at http://bugs.php.net/?id=37005&edit=1