ID:               40794
 Updated by:       [EMAIL PROTECTED]
 Reported By:      igor at webta dot net
-Status:           Open
+Status:           Feedback
 Bug Type:         Reproducible crash
 Operating System: FreeBSD 6.0-RELEASE
 PHP Version:      5.2.1
 New Comment:

Please try using this CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5.2-win32-latest.zip




Previous Comments:
------------------------------------------------------------------------

[2007-03-13 16:59:48] igor at webta dot net

Description:
------------
The following example results in a segfault in PHP 5:

Reproduce code:
---------------
<?
    $obj = new stdClass();
    $obj->prop1 = '1';
    $obj->prop2 = '2';
     
    $reflect = new ReflectionObject($obj);

    $array = array();
    foreach($reflect->getProperties() as $prop)
    {
        $array[$prop->getName()] = $prop->getValue($obj);
    }
    
    print_r($array);
?>

Expected result:
----------------
Array
(
    [prop1] => 1
    [prop2] => 2
)

Actual result:
--------------
Segmentation fault (core dumped)

(gdb) backtrace
#0  0x0808a5fa in zim_reflection_property_getValue ()
#1  0x081501b6 in zend_do_fcall_common_helper_SPEC ()
#2  0x0814f915 in execute ()
#3  0x08137fcf in zend_execute_scripts ()
#4  0x08101f41 in php_execute_script ()
#5  0x081b0934 in main ()



------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=40794&edit=1

Reply via email to