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