#36542 [Opn->Bgs]: Flash file causes crash when using getimagesize()

From: Date: Mon, 27 Feb 2006 15:24:22 +0000
Subject: #36542 [Opn->Bgs]: Flash file causes crash when using getimagesize()
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-93716@lists.php.net to get a copy of this message
ID: 36542 Updated by: tony2001@php.net Reported By: ogs22 at cam dot ac dot uk -Status: Open +Status: Bogus Bug Type: Reproducible crash PHP Version: 5.1.2 New Comment: So, it works fine and doesn't crash. No bug here. Previous Comments: ------------------------------------------------------------------------ [2006-02-27 16:11:37] ogs22 at cam dot ac dot uk After some testing- getimagesize() in 5.1.3-dev only works with flash files that are not in SWC format. php was compiled using: ./configure --enable-debug --with-apxs=/usr/sbin/apxs --with- zlib=/usr ------------------------------------------------------------------------ [2006-02-27 16:00:10] tony2001@php.net With 5.1.3-dev and zlib enabled I get this: array(5) { [0]=> int(550) [1]=> int(400) [2]=> int(13) [3]=> string(24) "width="550" height="400"" ["mime"]=> string(29) "application/x-shockwave-flash" } ------------------------------------------------------------------------ [2006-02-27 15:47:07] ogs22 at cam dot ac dot uk getimagesize does not work on the test flash file in 5.1.3 dev - but does not cause crash - so I can't append a backtrace, getimagesize returns false instead. I can append a backtrace from a non debug php5.1.2 though. Program received signal EXC_BAD_ACCESS, Could not access memory. Reason: 10 at address: 0x017e9000 0xffff8824 in ___memcpy () at /System/Library/Frameworks/ System.framework/PrivateHeaders/ppc/cpu_capabilities.h:189 189 /System/Library/Frameworks/System.framework/ PrivateHeaders/ppc/cpu_capabilities.h: No such file or directory. in /System/Library/Frameworks/System.framework/ PrivateHeaders/ppc/cpu_capabilities.h (gdb) bt #0 0xffff8824 in ___memcpy () at /System/Library/ Frameworks/System.framework/PrivateHeaders/ppc/ cpu_capabilities.h:189 #1 0x0249cae8 in _php_stream_copy_to_mem () #2 0x023e983c in php_handle_swc () #3 0x023ec694 in zif_getimagesize () #4 0x0250db20 in zend_do_fcall_common_helper_SPEC () #5 0x0251217c in ZEND_DO_FCALL_SPEC_CONST_HANDLER () #6 0x0250d5a4 in execute () #7 0x024e3bec in zend_execute_scripts () #8 0x02481d80 in php_execute_script () #9 0x02575318 in apache_php_module_main () #10 0x025766fc in send_php () #11 0x0257677c in send_parsed_php () #12 0x0000dd18 in ap_invoke_handler () #13 0x00017dd4 in process_request_internal () #14 0x00017e54 in ap_process_request () #15 0x00006b60 in child_main () #16 0x00006d18 in make_child () #17 0x00006e7c in startup_children () #18 0x000074ec in standalone_main () #19 0x00007d74 in main () ------------------------------------------------------------------------ [2006-02-27 14:16:05] tony2001@php.net Thank you for this bug report. To properly diagnose the problem, we need a backtrace to see what is happening behind the scenes. To find out how to generate a backtrace, please read http://bugs.php.net/bugs-generating-backtrace.php for *NIX and http://bugs.php.net/bugs-generating-backtrace-win32.php for Win32 Once you have generated a backtrace, please submit it to this bug report and change the status back to "Open". Thank you for helping us make PHP better. ------------------------------------------------------------------------ [2006-02-27 14:03:22] ogs22 at cam dot ac dot uk Description: ------------ Tested on php5.1.2 on FreeBSD and MacOSX 10.4.5 both running apache 1.3.3 using getimagesize on certain swf files causes crash test file is http://maths.org/~ogs22/ConstantDrop.swf it is a version 8 flash file - other version 8 files seem OK. Reproduce code: --------------- <?php $file="/Users/ogs/ConstantDrop.swf"; $x=getimagesize($file); print_r($x); ?> Expected result: ---------------- Array ( [0] => 720 [1] => 576 [2] => 13 [3] => width="720" height="576" [mime] => application/x-shockwave-flash ) Actual result: -------------- causes [Mon Feb 27 12:21:14 2006] [notice] child pid 19520 exit signal Bus error (10) to appear in apache error log and nothing to appear in browser ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=36542&edit=1

« previous php.bugs (#93716) next »