#33209 [Fbk->Opn]: PHP crashes creating SWF with Ming
| From: | jcruff at gmail dot com | Date: | Sat, 11 Jun 2005 22:03:15 +0000 |
| Subject: | #33209 [Fbk->Opn]: PHP crashes creating SWF with Ming | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-80185@lists.php.net to get a copy of this message | ||
ID: 33209
User updated by: jcruff at gmail dot com
Reported By: jcruff at gmail dot com
-Status: Feedback
+Status: Open
Bug Type: Ming related
Operating System: Mac OS X 10.4.1 (Darwin 8.1.0)
PHP Version: 5.0.3
New Comment:
Cannot compile the latest version from CVS (200506112030).
Compiling on Mac OS X 10.4.1 (Darwin 8.1.0); gcc 4.0.0
(powerpc-apple-darwin8-gcc-4.0.0); Xcode 2.0. Build error
below:
/bin/sh /Users/techniq/Software/BUILD/php5-200506112030/
libtool --silent --preserve-dup-deps --mode=compile gcc -
Iext/standard/ -I/Users/techniq/Software/BUILD/
php5-200506112030/ext/standard/ -DPHP_ATOM_INC -I/Users/
techniq/Software/BUILD/php5-200506112030/include -I/Users/
techniq/Software/BUILD/php5-200506112030/main -I/Users/
techniq/Software/BUILD/php5-200506112030 -I/usr/include/
libxml2 -I/Users/techniq/Software/BUILD/php5-200506112030/
TSRM -I/Users/techniq/Software/BUILD/php5-200506112030/Zend
-no-cpp-precomp -g -O2 -c /Users/techniq/Software/BUILD/
php5-200506112030/ext/standard/url_scanner_ex.c -o ext/
standard/url_scanner_ex.lo
/Users/techniq/Software/BUILD/php5-200506112030/ext/
standard/url_scanner_ex.c: In function
'append_modified_url':
/Users/techniq/Software/BUILD/php5-200506112030/ext/
standard/url_scanner_ex.c:110: error: parse error before
"static"
/Users/techniq/Software/BUILD/php5-200506112030/ext/
standard/url_scanner_ex.c:152: error: 'yybm' undeclared
(first use in this function)
/Users/techniq/Software/BUILD/php5-200506112030/ext/
standard/url_scanner_ex.c:152: error: (Each undeclared
identifier is reported only once
/Users/techniq/Software/BUILD/php5-200506112030/ext/
standard/url_scanner_ex.c:152: error: for each function it
appears in.)
/Users/techniq/Software/BUILD/php5-200506112030/ext/
standard/url_scanner_ex.c: In function 'xx_mainloop':
/Users/techniq/Software/BUILD/php5-200506112030/ext/
standard/url_scanner_ex.c:413: error: redefinition of 'yybm'
/Users/techniq/Software/BUILD/php5-200506112030/ext/
standard/url_scanner_ex.c:348: error: previous definition of
'yybm' was here
/Users/techniq/Software/BUILD/php5-200506112030/ext/
standard/url_scanner_ex.c:485: error: redefinition of 'yybm'
/Users/techniq/Software/BUILD/php5-200506112030/ext/
standard/url_scanner_ex.c:413: error: previous definition of
'yybm' was here
/Users/techniq/Software/BUILD/php5-200506112030/ext/
standard/url_scanner_ex.c:576: error: redefinition of 'yybm'
/Users/techniq/Software/BUILD/php5-200506112030/ext/
standard/url_scanner_ex.c:485: error: previous definition of
'yybm' was here
/Users/techniq/Software/BUILD/php5-200506112030/ext/
standard/url_scanner_ex.c:645: error: redefinition of 'yybm'
/Users/techniq/Software/BUILD/php5-200506112030/ext/
standard/url_scanner_ex.c:576: error: previous definition of
'yybm' was here
/Users/techniq/Software/BUILD/php5-200506112030/ext/
standard/url_scanner_ex.c:730: error: redefinition of 'yybm'
/Users/techniq/Software/BUILD/php5-200506112030/ext/
standard/url_scanner_ex.c:645: error: previous definition of
'yybm' was here
make: *** [ext/standard/url_scanner_ex.lo] Error 1
Previous Comments:
------------------------------------------------------------------------
[2005-06-04 01:08:21] sniper@php.net
Please try using this CVS snapshot:
http://snaps.php.net/php5-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php5-win32-latest.zip
------------------------------------------------------------------------
[2005-06-01 07:32:22] jcruff at gmail dot com
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 this bug report at http://bugs.php.net/?id=33209&edit=1