#37565 [Opn->Csd]: Using reflection::export with simplexml causing a crash
| From: | helly@php.net | Date: | Tue, 23 May 2006 22:08:39 +0000 |
| Subject: | #37565 [Opn->Csd]: Using reflection::export with simplexml causing a crash | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-97480@lists.php.net to get a copy of this message | ||
ID: 37565
Updated by: helly@php.net
Reported By: php at trancer dot nl
-Status: Open
+Status: Closed
Bug Type: Reproducible crash
Operating System: *
-PHP Version: 5.1.4
+PHP Version: 5.1.*
Assigned To: helly
New Comment:
This bug has been fixed in CVS.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
Thank you for the report, and for helping us make PHP better.
Fixed in CVS (5.2, HEAD only)
Previous Comments:
------------------------------------------------------------------------
[2006-05-23 21:42:26] php at trancer dot nl
Description:
------------
If you try to Reflection::export a simplexml loading that has been
loaded using a custom object extended by ReflectionObject PHP will
core.
Reproduce code:
---------------
<?php
class Setting extends ReflectionObject { }
Reflection::export(simplexml_load_string('<test />', "Setting"));
?>
Expected result:
----------------
Unknown.
Actual result:
--------------
Core dump of PHP.
1.
#0 _class_string (str=0x7fffffad4380, ce=0xbbff88, obj=0x0,
indent=0x7ba1a6 "", tsrm_ls=0x984030)
2.
at
/home/pierre/cvs/php_5_2/ext/reflection/php_reflection.c:312
3.
#1 0x0000000000525610 in zim_reflection_class___toString
(ht=Variable "ht" is not available.
4.
) at
/home/pierre/cvs/php_5_2/ext/reflection/php_reflection.c:2751
5.
#2 0x0000000000668902 in zend_call_function (fci=0x7fffffad4500,
fci_cache=Variable "fci_cache" is not available.
6.
) at /home/pierre/cvs/php_5_2/Zend/zend_execute_API.c:945
7.
#3 0x0000000000669b7b in call_user_function_ex
(function_table=Variable "function_table" is not available.
8.
) at /home/pierre/cvs/php_5_2/Zend/zend_execute_API.c:572
9.
#4 0x00000000005260d2 in zim_reflection_export (ht=Variable "ht"
is not available.
10.
) at
/home/pierre/cvs/php_5_2/ext/reflection/php_reflection.c:1257
11.
#5 0x000000000069809e in zend_do_fcall_common_helper_SPEC
(execute_data=0x7fffffad47a0, tsrm_ls=0x984030) at
zend_vm_execute.h:200
12.
#6 0x000000000069758f in execute (op_array=0xbba5c8,
tsrm_ls=0x984030) at zend_vm_execute.h:92
13.
#7 0x000000000067606f in zend_execute_scripts (type=8,
tsrm_ls=0x984030, retval=Variable "retval" is not available.
14.
) at /home/pierre/cvs/php_5_2/Zend/zend.c:1099
15.
#8 0x000000000062a759 in php_execute_script
(primary_file=0x7fffffad6e90, tsrm_ls=0x984030) at
/home/pierre/cvs/php_5_2/main/main.c:1743
16.
#9 0x0000000000725c34 in main (argc=2, argv=0x7fffffad7058) at
/home/pierre/cvs/php_5_2/sapi/cli/php_cli.c:1093
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=37565&edit=1