ID:               32231
 Updated by:       [EMAIL PROTECTED]
 Reported By:      bugs at niluje dot net
-Status:           Open
+Status:           Feedback
 Bug Type:         Reproducible crash
 Operating System: Debian linux x86
 PHP Version:      5.0.3
 New Comment:

Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc.

If possible, make the script source available online and provide
an URL to it here. Try to avoid embedding huge scripts into the report.




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

[2005-03-24 17:45:23] bugs at niluje dot net

here is a test case to trigger the segfault :

you need PEAR, DB, DB_Dataobject:


test.php
----------------------
<?php
        require_once 'PEAR.php';
        require_once 'DB/DataObject.php';
        PEAR::setErrorHandling(PEAR_ERROR_EXCEPTION);

        $config = parse_ini_file('dao.ini', TRUE);
        foreach($config as $class=>$values) {
                $options = &PEAR::getStaticProperty($class,
'options');
                $options = $values;
        }

        $options =
&PEAR::getStaticProperty('DB_DataObject','options');
        $options['class_prefix'] = '';
        $options['persistent'] = true;

        class Test extends DB_Dataobject
        {
                public $__table = 'test';
        }


        $dao = new Test();

        try {
                $dao->field1 = 'test';
                $dao->insert();
        }
        catch (Exception $e)
        {
                var_dump($e);
        }

?>
-----------


dao.ini
---------
[DB_DataObject]
debug = 1
database_test                   = mysqli://[EMAIL PROTECTED]/test
table_test                      = test
---------


gdb backtrace:
-----------
#0  0xb57f0c0e in zend_objects_clone_obj () from
/usr/lib/apache/1.3/libphp5.so
#0  0xb57f0c0e in zend_objects_clone_obj () from
/usr/lib/apache/1.3/libphp5.so
#1  0xb577f00d in php_var_dump () from /usr/lib/apache/1.3/libphp5.so
#2  0xb577ee3f in url_adapt () from /usr/lib/apache/1.3/libphp5.so
#3  0xb57e5986 in zend_hash_apply_with_arguments () from
/usr/lib/apache/1.3/libphp5.so
#4  0xb577f0b7 in php_var_dump () from /usr/lib/apache/1.3/libphp5.so
#5  0xb577f1d6 in zif_var_dump () from /usr/lib/apache/1.3/libphp5.so
#6  0xb581b851 in zend_do_fcall_common_helper () from
/usr/lib/apache/1.3/libphp5.so
#7  0xb581bfd0 in zend_do_fcall_handler () from
/usr/lib/apache/1.3/libphp5.so
#8  0xb580024f in execute () from /usr/lib/apache/1.3/libphp5.so
#9  0xb57df043 in zend_execute_scripts () from
/usr/lib/apache/1.3/libphp5.so
#10 0xb57a8c55 in php_execute_script () from
/usr/lib/apache/1.3/libphp5.so
#11 0xb5824755 in apache_php_module_main () from
/usr/lib/apache/1.3/libphp5.so
#12 0xb582537e in apache_php_module_main () from
/usr/lib/apache/1.3/libphp5.so
#13 0xb58253e5 in apache_php_module_main () from
/usr/lib/apache/1.3/libphp5.so
#14 0x080553c3 in ap_invoke_handler ()
#15 0x08068465 in ap_some_auth_required ()
#16 0x08068614 in ap_process_request ()
#17 0x08060bd2 in ap_child_terminate ()
#18 0x08060de7 in ap_child_terminate ()
#19 0x08060f10 in ap_child_terminate ()
#20 0x08061a9a in ap_child_terminate ()
#21 0x08061ff8 in main ()
------------------------

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

[2005-03-09 00:40:45] [EMAIL PROTECTED]

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

Your example script gives me this output:

Parse error: syntax error, unexpected T_CATCH in Command line code on
line 1


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

[2005-03-08 12:00:37] bugs at niluje dot net

Description:
------------
var_dump() on an exception crashes php5.


#0  0xb57f0c0e in zend_objects_clone_obj () from
/usr/lib/apache/1.3/libphp5.so
(gdb) bt
#0  0xb57f0c0e in zend_objects_clone_obj () from
/usr/lib/apache/1.3/libphp5.so
#1  0xb577f00d in php_var_dump () from /usr/lib/apache/1.3/libphp5.so
#2  0xb577ee3f in url_adapt () from /usr/lib/apache/1.3/libphp5.so
#3  0xb57e5986 in zend_hash_apply_with_arguments () from
/usr/lib/apache/1.3/libphp5.so
#4  0xb577f0b7 in php_var_dump () from /usr/lib/apache/1.3/libphp5.so
#5  0xb577f1d6 in zif_var_dump () from /usr/lib/apache/1.3/libphp5.so
#6  0xb581b851 in zend_do_fcall_common_helper () from
/usr/lib/apache/1.3/libphp5.so
#7  0xb581bfd0 in zend_do_fcall_handler () from
/usr/lib/apache/1.3/libphp5.so
#8  0xb580024f in execute () from /usr/lib/apache/1.3/libphp5.so
#9  0xb57df043 in zend_execute_scripts () from
/usr/lib/apache/1.3/libphp5.so
#10 0xb57a8c55 in php_execute_script () from
/usr/lib/apache/1.3/libphp5.so
#11 0xb5824755 in apache_php_module_main () from
/usr/lib/apache/1.3/libphp5.so
#12 0xb582537e in apache_php_module_main () from
/usr/lib/apache/1.3/libphp5.so
#13 0xb58253e5 in apache_php_module_main () from
/usr/lib/apache/1.3/libphp5.so
#14 0x080553c3 in ap_invoke_handler ()
#15 0x08068465 in ap_some_auth_required ()
#16 0x08068614 in ap_process_request ()
#17 0x08060bd2 in ap_child_terminate ()
#18 0x08060de7 in ap_child_terminate ()
#19 0x080610c7 in ap_child_terminate ()
#20 0x08061a48 in ap_child_terminate ()
#21 0x08061ff8 in main ()




Reproduce code:
---------------
catch (Exception $e) {
 var_dump ($e);
}



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


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

Reply via email to