From:             jcruff at gmail dot com
Operating system: Mac OS X 10.4.1 (Darwin 8.1.0)
PHP version:      5.0.3
PHP Bug Type:     Ming related
Bug description:  PHP crashes creating SWF with Ming

Description:
------------
PHP will crash if run as a DSO module or from CLI against the 
simple script below that uses the Ming library to create an SWF 
file.

Reproduce code:
---------------
<?php

// create new SWFMovie object
$myMovie = new SWFMovie();

// set size & background color attributes of movie object
$myMovie->setDimension(400,400);
$myMovie->setBackground(255,0,0);

$myMovie->save("mysquare.swf");

?>

Expected result:
----------------
When run under Apache the apache error log will say, "child pid 
##### exit signal Bus error (10)".  When from from CLI it just 
gives "bus error".  In either case a MAC OS X crash report is 
generated (shown below)

Actual result:
--------------
(gdb) run -X
Starting program: /usr/local/apache2/bin/httpd -X
Reading symbols for shared libraries . done
Reading symbols for shared libraries ... done
Reading symbols for shared libraries ....... done


Program received signal EXC_BAD_ACCESS, Could not access 
memory.
Reason: KERN_PROTECTION_FAILURE at address: 0x00000026
zend_hash_apply_with_argument (ht=0x12837d4, apply_func=0, 
argument=0x57b460) at /Users/fullstack/dlweskx/php-5.0.3/
Zend/zend_hash.c:680
680     /Users/fullstack/dlweskx/php-5.0.3/Zend/zend_hash.c: 
No such file or directory.
        in /Users/fullstack/dlweskx/php-5.0.3/Zend/
zend_hash.c
(gdb) 
(gdb) bt
#0  zend_hash_apply_with_argument (ht=0x12837d4, 
apply_func=0, argument=0x57b460) at /Users/fullstack/
dlweskx/php-5.0.3/Zend/zend_hash.c:680
#1  0x01123854 in _object_and_properties_init (arg=0x57b460, 
class_type=0x2ae2c0, properties=0x0) at /Users/fullstack/
dlweskx/php-5.0.3/Zend/zend_API.c:706
#2  0x0024e5fc in zif_swfmovie_init ()
#3  0x01146034 in zend_do_fcall_common_helper 
(execute_data=0xbfffddc0, opline=0x18bff40, 
op_array=0x57b500) at /Users/fullstack/dlweskx/php-5.0.3/
Zend/zend_execute.c:2711
#4  0x01142b90 in execute (op_array=0x57b500) at /Users/
fullstack/dlweskx/php-5.0.3/Zend/zend_execute.c:1400
#5  0x01121f50 in zend_execute_scripts (type=8, retval=0x0, 
file_count=3) at /Users/fullstack/dlweskx/php-5.0.3/Zend/
zend.c:1069
#6  0x010e8fa8 in php_execute_script 
(primary_file=0xbfffeb20) at /Users/fullstack/dlweskx/
php-5.0.3/main/main.c:1628
#7  0x0114e324 in php_handler (r=0x18b9c50) at /Users/
fullstack/dlweskx/php-5.0.3/sapi/apache2handler/
sapi_apache2.c:537
#8  0x00035f50 in ap_run_handler (r=0x18b9c50) at config.c:
152
#9  0x000366e0 in ap_invoke_handler (r=0x18b9c50) at 
config.c:363
#10 0x00011244 in ap_process_request (r=0x18b9c50) at 
http_request.c:246
#11 0x0000bf70 in ap_process_http_connection (c=0x18b5d28) 
at http_core.c:250
#12 0x0003cc88 in ap_run_process_connection (c=0x18b5d28) at 
connection.c:42
#13 0x00022860 in child_main (child_num_arg=0) at prefork.c:
609
#14 0x00022944 in make_child (s=0x180ab40, slot=0) at 
prefork.c:649
#15 0x00022a90 in startup_children (number_to_start=2) at 
prefork.c:721
#16 0x00022ee0 in ap_mpm_run (_pconf=0x0, plog=0x11161ec, 
s=0x180ab40) at prefork.c:940
#17 0x00024830 in main (argc=2, argv=0xbffff474) at main.c:
617
(gdb)

-- 
Edit bug report at http://bugs.php.net/?id=33209&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=33209&r=trysnapshot4
Try a CVS snapshot (php5.0): 
http://bugs.php.net/fix.php?id=33209&r=trysnapshot50
Try a CVS snapshot (php5.1): 
http://bugs.php.net/fix.php?id=33209&r=trysnapshot51
Fixed in CVS:                http://bugs.php.net/fix.php?id=33209&r=fixedcvs
Fixed in release:            http://bugs.php.net/fix.php?id=33209&r=alreadyfixed
Need backtrace:              http://bugs.php.net/fix.php?id=33209&r=needtrace
Need Reproduce Script:       http://bugs.php.net/fix.php?id=33209&r=needscript
Try newer version:           http://bugs.php.net/fix.php?id=33209&r=oldversion
Not developer issue:         http://bugs.php.net/fix.php?id=33209&r=support
Expected behavior:           http://bugs.php.net/fix.php?id=33209&r=notwrong
Not enough info:             
http://bugs.php.net/fix.php?id=33209&r=notenoughinfo
Submitted twice:             
http://bugs.php.net/fix.php?id=33209&r=submittedtwice
register_globals:            http://bugs.php.net/fix.php?id=33209&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=33209&r=php3
Daylight Savings:            http://bugs.php.net/fix.php?id=33209&r=dst
IIS Stability:               http://bugs.php.net/fix.php?id=33209&r=isapi
Install GNU Sed:             http://bugs.php.net/fix.php?id=33209&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=33209&r=float
No Zend Extensions:          http://bugs.php.net/fix.php?id=33209&r=nozend
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=33209&r=mysqlcfg

Reply via email to