From:             php at trancer dot nl
Operating system: Any
PHP version:      5.1.4
PHP Bug Type:     Reproducible crash
Bug description:  Using reflection::export with simplexml causing a crash

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 bug report at http://bugs.php.net/?id=37565&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=37565&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=37565&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=37565&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=37565&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=37565&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=37565&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=37565&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=37565&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=37565&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=37565&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=37565&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=37565&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=37565&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=37565&r=php3
Daylight Savings:             http://bugs.php.net/fix.php?id=37565&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=37565&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=37565&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=37565&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=37565&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=37565&r=mysqlcfg

Reply via email to